class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: C = None
        self.w: D = None
        self.r: B = None
        self.o: D = None
        self.txt = txt

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

k.r = j
k.y = m
m.v = f
m.u = c
m.t = h
m.r = e
e.x = n
e.q = k
e.v = h
e.t = j
f.p = e
f.w = e
n.v = m
n.x = e
n.w = f
n.r = h
n.o = d
c.r = n
c.y = h
a.v = m
a.x = e
a.w = f
a.o = f
a.r = h
j.v = h
j.x = e
j.w = f
j.r = m
j.o = d
h.v = d
h.u = c
h.t = m
h.r = e
d.p = e
d.w = e
assert e.v.v.p.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: C = None
        self.w: D = None
        self.r: B = None
        self.o: D = None
        self.txt = txt

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

k.r = j
k.y = m
m.v = f
m.u = c
m.t = h
m.r = e
e.x = n
e.q = k
e.v = h
e.t = j
f.p = e
f.w = e
n.v = m
n.x = e
n.w = f
n.r = h
n.o = d
c.r = n
c.y = h
a.v = m
a.x = e
a.w = f
a.o = f
a.r = h
j.v = h
j.x = e
j.w = f
j.r = m
j.o = d
h.v = d
h.u = c
h.t = m
h.r = e
d.p = e
d.w = e
assert e.v.v.p.t.v.txt == "h"