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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: A = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: D = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

i = A("i")
n = B("n")
c = C("c")
g = D("g")
k = E("k")
a = D("a")
f = D("f")
l = E("l")

i.t = n
i.y = n
i.r = g
i.o = l
i.w = k
n.y = c
n.w = c
n.u = c
c.o = l
c.x = i
c.q = i
c.v = n
g.q = c
g.r = i
k.o = i
k.w = a
k.z = c
k.v = c
a.q = c
a.r = i
f.q = c
f.r = i
l.o = i
l.w = g
l.z = c
l.v = c
assert l.v.v.u.o.o.o.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.y: B = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: A = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: D = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

i = A("i")
n = B("n")
c = C("c")
g = D("g")
k = E("k")
a = D("a")
f = D("f")
l = E("l")

i.t = n
i.y = n
i.r = g
i.o = l
i.w = k
n.y = c
n.w = c
n.u = c
c.o = l
c.x = i
c.q = i
c.v = n
g.q = c
g.r = i
k.o = i
k.w = a
k.z = c
k.v = c
a.q = c
a.r = i
f.q = c
f.r = i
l.o = i
l.w = g
l.z = c
l.v = c
assert l.v.v.u.o.o.o.v.v.txt == "n"