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

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

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

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

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

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

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

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

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

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

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

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

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