class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

e.z = k
e.u = k
e.v = d
c.z = i
k.w = n
k.q = e
d.z = a
d.t = i
n.p = k
n.z = k
n.x = c
n.r = d
n.t = e
n.s = a
a.v = i
i.z = c
assert i.z.z.z.z.z.z.z.txt == "c"