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

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

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

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

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

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

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

l.t = a
l.o = e
a.y = f
e.z = l
e.y = j
e.v = j
e.s = g
e.t = g
g.q = h
g.t = l
g.s = a
j.s = g
d.q = l
d.w = j
h.q = l
h.w = j
k.z = l
k.y = j
k.v = j
k.s = g
k.t = g
f.y = a
assert a.y.y.y.y.y.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

l.t = a
l.o = e
a.y = f
e.z = l
e.y = j
e.v = j
e.s = g
e.t = g
g.q = h
g.t = l
g.s = a
j.s = g
d.q = l
d.w = j
h.q = l
h.w = j
k.z = l
k.y = j
k.v = j
k.s = g
k.t = g
f.y = a
assert a.y.y.y.y.y.y.y.y.txt == "a"