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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: E = None
        self.p: B = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: E = None
        self.p: B = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

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

f.w = d
g.w = i
g.t = i
g.u = e
i.r = g
i.z = c
i.p = d
i.v = l
i.q = l
e.t = d
e.q = d
c.y = i
c.p = b
c.t = n
c.u = f
c.o = f
d.w = i
d.t = i
d.u = e
n.t = d
n.q = d
b.y = i
b.p = c
b.t = n
b.u = f
b.o = f
a.y = i
a.p = l
a.t = e
a.u = f
a.o = f
l.y = i
l.p = c
l.t = n
l.u = f
l.o = f
assert l.p.p.t.q.w.p.w.v.p.txt == "c"