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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: D = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.u: E = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

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

l.u = k
i.r = k
i.w = h
i.o = e
i.t = l
c.z = f
n.x = c
n.q = d
n.w = m
n.r = h
m.y = e
m.p = k
m.u = f
m.t = f
m.s = d
h.r = k
h.w = e
h.o = e
h.t = l
e.r = k
e.w = h
e.o = h
e.t = l
d.x = k
d.q = n
d.w = f
d.r = h
f.y = i
f.p = c
f.u = m
f.t = m
f.s = d
k.z = f
assert f.p.z.t.t.t.y.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: D = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.u: E = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

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

l.u = k
i.r = k
i.w = h
i.o = e
i.t = l
c.z = f
n.x = c
n.q = d
n.w = m
n.r = h
m.y = e
m.p = k
m.u = f
m.t = f
m.s = d
h.r = k
h.w = e
h.o = e
h.t = l
e.r = k
e.w = h
e.o = h
e.t = l
d.x = k
d.q = n
d.w = f
d.r = h
f.y = i
f.p = c
f.u = m
f.t = m
f.s = d
k.z = f
assert f.p.z.t.t.t.y.t.u.txt == "k"