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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.w: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: A = None
        self.u: B = None
        self.w: E = None
        self.txt = txt

l = A("l")
j = B("j")
a = C("a")
m = D("m")
d = E("d")
k = B("k")
e = B("e")
c = C("c")
f = E("f")
n = D("n")

l.o = d
l.p = k
j.t = k
a.w = l
m.y = j
m.u = f
m.w = l
m.x = k
d.s = f
d.w = f
d.o = l
d.u = k
k.t = e
e.t = k
c.w = l
f.s = d
f.w = d
f.o = l
f.u = k
n.y = k
n.x = k
n.u = f
n.w = l
assert d.u.t.t.t.t.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.w: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: A = None
        self.u: B = None
        self.w: E = None
        self.txt = txt

l = A("l")
j = B("j")
a = C("a")
m = D("m")
d = E("d")
k = B("k")
e = B("e")
c = C("c")
f = E("f")
n = D("n")

l.o = d
l.p = k
j.t = k
a.w = l
m.y = j
m.u = f
m.w = l
m.x = k
d.s = f
d.w = f
d.o = l
d.u = k
k.t = e
e.t = k
c.w = l
f.s = d
f.w = d
f.o = l
f.u = k
n.y = k
n.x = k
n.u = f
n.w = l
assert d.u.t.t.t.t.t.t.txt == "k"