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

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

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

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

k = A("k")
i = B("i")
a = C("a")
n = D("n")
j = A("j")
h = B("h")
d = D("d")
b = C("b")
e = D("e")
c = B("c")

k.z = b
k.v = a
k.o = a
k.r = j
i.w = d
i.s = j
a.u = e
a.y = e
a.v = j
n.t = h
n.x = e
n.o = e
j.z = b
j.v = b
j.o = b
j.r = k
h.w = e
h.s = k
d.t = c
d.x = n
d.o = e
b.u = e
b.v = j
b.y = d
e.t = i
e.x = d
e.o = n
c.w = e
c.s = j
assert a.y.t.w.x.x.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.o: C = None
        self.r: A = None
        self.txt = txt

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

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

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

k = A("k")
i = B("i")
a = C("a")
n = D("n")
j = A("j")
h = B("h")
d = D("d")
b = C("b")
e = D("e")
c = B("c")

k.z = b
k.v = a
k.o = a
k.r = j
i.w = d
i.s = j
a.u = e
a.y = e
a.v = j
n.t = h
n.x = e
n.o = e
j.z = b
j.v = b
j.o = b
j.r = k
h.w = e
h.s = k
d.t = c
d.x = n
d.o = e
b.u = e
b.v = j
b.y = d
e.t = i
e.x = d
e.o = n
c.w = e
c.s = j
assert a.y.t.w.x.x.x.o.txt == "e"