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

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

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

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

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

e = A("e")
l = B("l")
m = C("m")
k = D("k")
i = E("i")
d = B("d")
b = A("b")
c = D("c")
h = C("h")
j = A("j")

e.v = h
e.p = l
l.z = i
l.p = i
l.x = b
l.o = d
m.r = b
m.t = k
k.v = h
k.q = d
k.y = c
i.q = h
i.s = m
d.z = i
d.p = i
d.x = b
d.o = l
b.v = m
b.p = d
c.v = h
c.q = l
c.y = k
h.r = e
h.t = c
j.v = m
j.p = d
assert d.o.o.z.q.r.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

e = A("e")
l = B("l")
m = C("m")
k = D("k")
i = E("i")
d = B("d")
b = A("b")
c = D("c")
h = C("h")
j = A("j")

e.v = h
e.p = l
l.z = i
l.p = i
l.x = b
l.o = d
m.r = b
m.t = k
k.v = h
k.q = d
k.y = c
i.q = h
i.s = m
d.z = i
d.p = i
d.x = b
d.o = l
b.v = m
b.p = d
c.v = h
c.q = l
c.y = k
h.r = e
h.t = c
j.v = m
j.p = d
assert d.o.o.z.q.r.v.r.txt == "e"