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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: D = None
        self.z: D = None
        self.q: D = None
        self.p: C = None
        self.txt = txt

i = A("i")
b = B("b")
f = C("f")
a = D("a")
m = E("m")
k = F("k")
e = D("e")
c = F("c")
n = E("n")
l = C("l")

i.z = f
i.p = n
i.o = k
b.x = n
f.u = b
a.t = i
a.x = i
m.r = i
m.x = c
m.p = l
m.t = k
m.o = a
k.t = l
k.y = a
k.z = a
k.q = a
k.p = f
e.t = i
e.x = i
c.t = f
c.p = f
c.y = e
c.z = e
c.q = e
n.r = i
n.x = k
n.p = l
n.t = c
n.o = e
l.u = b
assert k.t.u.x.o.x.z.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: E = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: D = None
        self.z: D = None
        self.q: D = None
        self.p: C = None
        self.txt = txt

i = A("i")
b = B("b")
f = C("f")
a = D("a")
m = E("m")
k = F("k")
e = D("e")
c = F("c")
n = E("n")
l = C("l")

i.z = f
i.p = n
i.o = k
b.x = n
f.u = b
a.t = i
a.x = i
m.r = i
m.x = c
m.p = l
m.t = k
m.o = a
k.t = l
k.y = a
k.z = a
k.q = a
k.p = f
e.t = i
e.x = i
c.t = f
c.p = f
c.y = e
c.z = e
c.q = e
n.r = i
n.x = k
n.p = l
n.t = c
n.o = e
l.u = b
assert k.t.u.x.o.x.z.u.x.txt == "n"