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

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

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

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

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

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

k = A("k")
h = B("h")
l = C("l")
g = D("g")
e = E("e")
j = F("j")
b = B("b")
i = F("i")
a = E("a")

k.z = j
k.o = e
h.q = l
l.o = b
l.t = e
l.q = a
g.p = a
g.w = l
g.v = b
e.x = i
j.z = i
j.r = i
j.s = i
j.w = a
j.u = k
j.x = l
b.q = l
i.z = j
i.r = j
i.s = j
i.w = a
i.u = k
i.x = l
a.x = i
assert b.q.o.q.o.q.q.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

k = A("k")
h = B("h")
l = C("l")
g = D("g")
e = E("e")
j = F("j")
b = B("b")
i = F("i")
a = E("a")

k.z = j
k.o = e
h.q = l
l.o = b
l.t = e
l.q = a
g.p = a
g.w = l
g.v = b
e.x = i
j.z = i
j.r = i
j.s = i
j.w = a
j.u = k
j.x = l
b.q = l
i.z = j
i.r = j
i.s = j
i.w = a
i.u = k
i.x = l
a.x = i
assert b.q.o.q.o.q.q.x.txt == "i"