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

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

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

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

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

i.u = a
i.t = e
i.s = h
n.q = l
n.s = k
n.r = d
d.s = i
d.v = l
d.w = m
d.x = a
a.y = n
k.u = l
k.t = l
k.s = n
g.s = k
g.v = e
g.x = e
g.w = d
h.q = e
h.s = k
h.r = d
m.s = k
m.v = e
m.w = g
m.x = a
l.y = h
e.y = n
assert a.y.s.s.q.y.s.s.s.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: D = None
        self.s: B = None
        self.txt = txt

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

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

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

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

i.u = a
i.t = e
i.s = h
n.q = l
n.s = k
n.r = d
d.s = i
d.v = l
d.w = m
d.x = a
a.y = n
k.u = l
k.t = l
k.s = n
g.s = k
g.v = e
g.x = e
g.w = d
h.q = e
h.s = k
h.r = d
m.s = k
m.v = e
m.w = g
m.x = a
l.y = h
e.y = n
assert a.y.s.s.q.y.s.s.s.s.s.txt == "k"