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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: B = None
        self.z: E = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: B = None
        self.z: E = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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