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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: A = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

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

i = A("i")
f = B("f")
a = C("a")
j = D("j")
m = E("m")
e = E("e")
b = E("b")
h = C("h")
d = E("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: A = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

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

i = A("i")
f = B("f")
a = C("a")
j = D("j")
m = E("m")
e = E("e")
b = E("b")
h = C("h")
d = E("d")

i.v = f
i.t = d
f.v = j
a.v = h
a.p = h
a.z = i
a.u = i
j.y = h
j.o = i
j.p = f
j.z = f
m.o = e
m.r = f
m.y = f
m.u = i
m.w = j
e.o = d
e.r = f
e.y = f
e.u = i
e.w = j
b.o = d
b.r = f
b.y = f
b.u = i
b.w = j
h.v = a
h.p = a
h.z = i
h.u = i
d.o = e
d.r = f
d.y = f
d.u = i
d.w = j
assert j.z.v.z.v.o.v.v.y.txt == "h"