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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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