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

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

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

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

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

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

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

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

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

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

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