class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: J = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: C = None
        self.w: J = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.w: B = None
        self.p: C = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: J = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: C = None
        self.w: J = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.w: B = None
        self.p: C = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

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

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