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

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

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

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

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

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

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

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

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

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

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

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

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