class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: E = None
        self.p: D = None
        self.z: C = None
        self.y: E = None
        self.txt = txt

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

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

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

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

c = A("c")
n = B("n")
m = C("m")
e = D("e")
j = E("j")
a = E("a")
k = B("k")
g = E("g")
b = C("b")

c.x = e
c.p = e
c.r = g
c.y = g
c.z = m
n.p = b
n.q = e
n.z = e
n.v = k
m.w = c
m.q = c
m.u = e
m.o = n
m.y = j
e.t = b
e.s = c
j.s = b
j.o = b
j.v = b
j.q = c
j.p = m
a.s = m
a.v = m
a.o = b
a.p = b
a.q = c
k.p = b
k.q = e
k.z = e
k.v = n
g.s = m
g.o = m
g.p = m
g.q = c
g.v = b
b.w = c
b.q = c
b.u = e
b.o = k
b.y = a
assert b.q.z.y.q.p.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: E = None
        self.p: D = None
        self.z: C = None
        self.y: E = None
        self.txt = txt

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

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

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

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

c = A("c")
n = B("n")
m = C("m")
e = D("e")
j = E("j")
a = E("a")
k = B("k")
g = E("g")
b = C("b")

c.x = e
c.p = e
c.r = g
c.y = g
c.z = m
n.p = b
n.q = e
n.z = e
n.v = k
m.w = c
m.q = c
m.u = e
m.o = n
m.y = j
e.t = b
e.s = c
j.s = b
j.o = b
j.v = b
j.q = c
j.p = m
a.s = m
a.v = m
a.o = b
a.p = b
a.q = c
k.p = b
k.q = e
k.z = e
k.v = n
g.s = m
g.o = m
g.p = m
g.q = c
g.v = b
b.w = c
b.q = c
b.u = e
b.o = k
b.y = a
assert b.q.z.y.q.p.t.o.txt == "k"