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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

b.z = i
b.t = i
b.o = n
b.u = k
f.s = j
f.x = b
f.u = n
f.o = k
n.s = j
n.y = b
n.t = f
d.z = e
d.p = k
k.q = d
k.x = d
a.u = k
a.z = k
c.s = a
c.y = b
c.t = f
j.u = k
j.z = k
i.z = b
i.t = b
i.o = e
i.u = k
e.s = a
e.y = b
e.t = f
assert c.t.u.t.x.o.s.z.txt == "k"