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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: F = None
        self.x: F = None
        self.q: F = None
        self.s: D = 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.w: B = None
        self.o: A = None
        self.t: A = None
        self.s: F = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: F = None
        self.x: F = None
        self.q: F = None
        self.s: D = 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.w: B = None
        self.o: A = None
        self.t: A = None
        self.s: F = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.u: E = None
        self.txt = txt

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

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