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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

i = A("i")
n = B("n")
e = C("e")
k = D("k")
m = A("m")
l = D("l")

i.r = n
i.o = m
i.q = m
i.p = e
n.s = e
n.x = l
n.o = m
n.y = i
e.u = n
k.q = l
k.p = n
k.y = n
m.r = n
m.o = i
m.q = i
m.p = e
l.q = k
l.p = n
l.y = n
assert m.o.p.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: A = None
        self.q: A = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

i = A("i")
n = B("n")
e = C("e")
k = D("k")
m = A("m")
l = D("l")

i.r = n
i.o = m
i.q = m
i.p = e
n.s = e
n.x = l
n.o = m
n.y = i
e.u = n
k.q = l
k.p = n
k.y = n
m.r = n
m.o = i
m.q = i
m.p = e
l.q = k
l.p = n
l.y = n
assert m.o.p.u.y.txt == "i"