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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

l = A("l")
e = B("e")
a = C("a")
n = D("n")
h = A("h")
j = D("j")
k = C("k")
c = A("c")

l.t = h
l.r = n
l.o = e
e.z = l
e.u = j
e.x = k
e.o = a
a.w = h
n.v = e
n.z = j
n.r = j
n.p = k
h.t = l
h.r = j
h.o = e
j.v = e
j.z = n
j.r = n
j.p = a
k.w = h
c.t = h
c.r = n
c.o = e
assert h.r.r.p.w.o.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: D = None
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

l = A("l")
e = B("e")
a = C("a")
n = D("n")
h = A("h")
j = D("j")
k = C("k")
c = A("c")

l.t = h
l.r = n
l.o = e
e.z = l
e.u = j
e.x = k
e.o = a
a.w = h
n.v = e
n.z = j
n.r = j
n.p = k
h.t = l
h.r = j
h.o = e
j.v = e
j.z = n
j.r = n
j.p = a
k.w = h
c.t = h
c.r = n
c.o = e
assert h.r.r.p.w.o.u.z.txt == "n"