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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: C = None
        self.o: D = None
        self.q: E = None
        self.z: E = None
        self.txt = txt

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

f.q = l
f.p = l
f.w = b
n.v = d
n.q = j
d.q = f
d.o = f
d.s = b
d.w = j
c.q = l
c.v = l
c.s = e
c.t = d
b.y = j
b.v = a
b.o = l
b.q = e
b.z = e
a.q = f
a.o = f
a.s = e
a.w = n
l.q = c
l.v = c
l.s = e
l.t = a
j.v = a
j.q = n
e.y = n
e.v = d
e.o = c
e.q = b
e.z = b
assert e.v.s.y.v.o.w.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.w: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: C = None
        self.o: D = None
        self.q: E = None
        self.z: E = None
        self.txt = txt

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

f.q = l
f.p = l
f.w = b
n.v = d
n.q = j
d.q = f
d.o = f
d.s = b
d.w = j
c.q = l
c.v = l
c.s = e
c.t = d
b.y = j
b.v = a
b.o = l
b.q = e
b.z = e
a.q = f
a.o = f
a.s = e
a.w = n
l.q = c
l.v = c
l.s = e
l.t = a
j.v = a
j.q = n
e.y = n
e.v = d
e.o = c
e.q = b
e.z = b
assert e.v.s.y.v.o.w.q.o.txt == "c"