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

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: A = None
        self.r: A = None
        self.s: B = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: E = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: D = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: A = None
        self.r: A = None
        self.s: B = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: E = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: D = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

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

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