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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.z: A = None
        self.v: C = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: D = None
        self.z: A = None
        self.r: B = None
        self.y: F = None
        self.q: E = None
        self.p: G = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: A = None
        self.x: A = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: A = None
        self.o: C = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: D = None
        self.w: G = None
        self.u: F = None
        self.y: E = None
        self.o: B = None
        self.txt = txt

e = A("e")
d = B("d")
a = C("a")
l = D("l")
i = E("i")
k = F("k")
b = G("b")
j = H("j")
f = C("f")
m = D("m")

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.z: A = None
        self.v: C = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: D = None
        self.z: A = None
        self.r: B = None
        self.y: F = None
        self.q: E = None
        self.p: G = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: A = None
        self.x: A = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: A = None
        self.o: C = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: D = None
        self.w: G = None
        self.u: F = None
        self.y: E = None
        self.o: B = None
        self.txt = txt

e = A("e")
d = B("d")
a = C("a")
l = D("l")
i = E("i")
k = F("k")
b = G("b")
j = H("j")
f = C("f")
m = D("m")

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