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

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

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

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

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

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

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

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

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

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

g.w = n
g.y = l
g.o = m
g.t = a
a.w = k
a.u = k
a.r = l
a.x = l
d.t = h
d.u = j
d.z = k
n.u = h
n.p = h
n.y = m
n.z = e
l.w = n
l.y = g
l.o = d
l.t = a
k.w = a
k.u = a
k.r = l
k.x = l
e.t = m
e.u = n
e.z = k
m.t = h
m.u = j
m.z = a
h.t = e
h.u = j
h.z = a
j.u = h
j.y = h
j.p = e
j.z = d
assert k.x.y.y.o.z.w.u.x.y.o.txt == "m"