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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: E = None
        self.r: B = None
        self.x: B = None
        self.v: D = None
        self.s: B = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.txt = txt

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

h = A("h")
j = B("j")
b = C("b")
i = D("i")
g = E("g")
k = F("k")
n = G("n")
a = H("a")
l = I("l")
e = J("e")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: E = None
        self.r: B = None
        self.x: B = None
        self.v: D = None
        self.s: B = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.txt = txt

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

h = A("h")
j = B("j")
b = C("b")
i = D("i")
g = E("g")
k = F("k")
n = G("n")
a = H("a")
l = I("l")
e = J("e")

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