class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: H = None
        self.q: J = None
        self.p: I = None
        self.s: H = None
        self.v: G = None
        self.u: D = None
        self.t: I = None
        self.z: H = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: I = None
        self.u: G = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: I = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: D = None
        self.y: A = None
        self.r: C = None
        self.x: E = None
        self.z: H = None
        self.u: H = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.y: E = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.z: H = None
        self.o: F = None
        self.v: A = None
        self.u: H = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: I = None
        self.q: D = None
        self.r: C = None
        self.s: D = None
        self.p: D = None
        self.o: I = None
        self.u: G = None
        self.v: E = None
        self.y: H = None
        self.txt = txt

k = A("k")
l = B("l")
m = C("m")
j = D("j")
g = E("g")
d = F("d")
b = G("b")
e = H("e")
f = I("f")
n = J("n")

k.y = n
l.r = d
l.x = e
l.s = e
l.z = e
l.y = e
l.q = n
l.p = f
l.t = f
l.v = b
l.u = j
m.x = d
m.t = d
m.y = f
m.u = b
j.o = n
g.t = m
g.u = b
d.p = l
d.t = f
d.w = j
b.w = l
b.o = j
b.y = k
b.r = m
b.x = g
b.z = e
b.u = e
b.t = f
e.o = g
e.y = g
e.q = j
e.v = l
f.t = g
f.p = g
f.z = e
f.u = e
f.w = e
f.o = d
f.v = k
n.t = g
n.v = g
n.z = f
n.o = f
n.q = j
n.s = j
n.p = j
n.r = m
n.u = b
n.y = e
assert b.t.v.y.u.w.s.v.r.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: H = None
        self.q: J = None
        self.p: I = None
        self.s: H = None
        self.v: G = None
        self.u: D = None
        self.t: I = None
        self.z: H = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: I = None
        self.u: G = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: I = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: D = None
        self.y: A = None
        self.r: C = None
        self.x: E = None
        self.z: H = None
        self.u: H = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.y: E = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.z: H = None
        self.o: F = None
        self.v: A = None
        self.u: H = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: I = None
        self.q: D = None
        self.r: C = None
        self.s: D = None
        self.p: D = None
        self.o: I = None
        self.u: G = None
        self.v: E = None
        self.y: H = None
        self.txt = txt

k = A("k")
l = B("l")
m = C("m")
j = D("j")
g = E("g")
d = F("d")
b = G("b")
e = H("e")
f = I("f")
n = J("n")

k.y = n
l.r = d
l.x = e
l.s = e
l.z = e
l.y = e
l.q = n
l.p = f
l.t = f
l.v = b
l.u = j
m.x = d
m.t = d
m.y = f
m.u = b
j.o = n
g.t = m
g.u = b
d.p = l
d.t = f
d.w = j
b.w = l
b.o = j
b.y = k
b.r = m
b.x = g
b.z = e
b.u = e
b.t = f
e.o = g
e.y = g
e.q = j
e.v = l
f.t = g
f.p = g
f.z = e
f.u = e
f.w = e
f.o = d
f.v = k
n.t = g
n.v = g
n.z = f
n.o = f
n.q = j
n.s = j
n.p = j
n.r = m
n.u = b
n.y = e
assert b.t.v.y.u.w.s.v.r.t.o.txt == "d"