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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: D = None
        self.s: F = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: F = None
        self.o: A = None
        self.w: D = None
        self.q: A = None
        self.v: C = None
        self.p: H = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: I = None
        self.p: C = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: E = None
        self.s: E = None
        self.t: H = None
        self.w: D = None
        self.r: B = None
        self.o: C = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: A = None
        self.q: C = None
        self.x: D = None
        self.v: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: D = None
        self.s: F = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: F = None
        self.o: A = None
        self.w: D = None
        self.q: A = None
        self.v: C = None
        self.p: H = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: I = None
        self.p: C = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: E = None
        self.s: E = None
        self.t: H = None
        self.w: D = None
        self.r: B = None
        self.o: C = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: A = None
        self.q: C = None
        self.x: D = None
        self.v: I = None
        self.txt = txt

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

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