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

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

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

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

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

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

e.v = l
f.o = c
f.v = e
m.y = l
m.x = l
m.w = n
m.t = n
m.o = f
c.y = f
c.t = f
c.z = f
c.p = l
c.v = j
a.v = l
a.o = c
a.t = j
l.y = f
l.t = f
l.z = f
l.p = c
l.v = j
j.v = l
h.v = l
h.o = l
h.t = j
b.v = l
b.o = c
b.t = e
n.y = l
n.x = l
n.w = m
n.t = m
n.o = f
assert l.p.p.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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

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

e.v = l
f.o = c
f.v = e
m.y = l
m.x = l
m.w = n
m.t = n
m.o = f
c.y = f
c.t = f
c.z = f
c.p = l
c.v = j
a.v = l
a.o = c
a.t = j
l.y = f
l.t = f
l.z = f
l.p = c
l.v = j
j.v = l
h.v = l
h.o = l
h.t = j
b.v = l
b.o = c
b.t = e
n.y = l
n.x = l
n.w = m
n.t = m
n.o = f
assert l.p.p.v.v.txt == "l"