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

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

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

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

a = A("a")
l = B("l")
e = C("e")
f = D("f")
c = C("c")
g = D("g")
k = A("k")
h = D("h")
j = B("j")
i = B("i")

a.v = f
a.o = f
a.q = k
a.p = h
l.y = f
l.r = c
l.t = h
l.w = a
e.w = g
e.x = g
e.s = f
f.y = c
f.o = k
f.q = a
f.z = e
c.w = h
c.x = f
c.s = g
g.y = c
g.z = c
g.o = k
g.q = k
k.v = g
k.q = a
k.o = h
k.p = h
h.y = e
h.o = a
h.q = k
h.z = c
j.y = f
j.r = e
j.t = h
j.w = k
i.y = h
i.r = c
i.t = f
i.w = k
assert l.w.p.q.p.q.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: A = None
        self.o: D = None
        self.p: D = None
        self.txt = txt

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

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

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

a = A("a")
l = B("l")
e = C("e")
f = D("f")
c = C("c")
g = D("g")
k = A("k")
h = D("h")
j = B("j")
i = B("i")

a.v = f
a.o = f
a.q = k
a.p = h
l.y = f
l.r = c
l.t = h
l.w = a
e.w = g
e.x = g
e.s = f
f.y = c
f.o = k
f.q = a
f.z = e
c.w = h
c.x = f
c.s = g
g.y = c
g.z = c
g.o = k
g.q = k
k.v = g
k.q = a
k.o = h
k.p = h
h.y = e
h.o = a
h.q = k
h.z = c
j.y = f
j.r = e
j.t = h
j.w = k
i.y = h
i.r = c
i.t = f
i.w = k
assert l.w.p.q.p.q.o.y.txt == "e"