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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.o: F = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: B = None
        self.v: C = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.o: F = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: B = None
        self.v: C = None
        self.w: C = None
        self.txt = txt

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

j.t = k
j.z = l
j.v = e
i.p = l
i.w = l
i.o = j
i.z = c
i.r = e
i.t = e
k.t = h
c.t = l
c.q = i
l.u = e
l.o = e
l.y = h
l.t = c
e.r = c
e.u = i
e.v = k
e.w = k
h.t = k
assert h.t.t.t.t.t.txt == "k"