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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.u: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: A = None
        self.x: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.u: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: A = None
        self.x: B = None
        self.u: A = None
        self.txt = txt

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

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