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

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

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

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

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

n.s = c
n.p = g
n.u = h
n.z = m
i.q = n
i.o = l
i.t = m
i.x = m
k.u = m
l.y = m
l.p = m
l.w = h
l.q = h
e.q = n
e.o = h
e.t = k
e.x = k
m.u = k
g.s = e
g.p = n
g.u = l
g.z = m
c.q = g
c.o = l
c.t = k
c.x = m
h.y = m
h.p = m
h.w = l
h.q = l
assert l.q.y.u.u.u.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: A = None
        self.u: D = None
        self.z: C = None
        self.txt = txt

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

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

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

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

n.s = c
n.p = g
n.u = h
n.z = m
i.q = n
i.o = l
i.t = m
i.x = m
k.u = m
l.y = m
l.p = m
l.w = h
l.q = h
e.q = n
e.o = h
e.t = k
e.x = k
m.u = k
g.s = e
g.p = n
g.u = l
g.z = m
c.q = g
c.o = l
c.t = k
c.x = m
h.y = m
h.p = m
h.w = l
h.q = l
assert l.q.y.u.u.u.u.u.u.txt == "m"