class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.y: G = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.t: D = None
        self.q: F = None
        self.p: D = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: H = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.o: D = None
        self.u: H = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: F = None
        self.txt = txt

n = A("n")
d = B("d")
j = C("j")
c = D("c")
h = E("h")
b = F("b")
i = G("i")
a = H("a")
l = B("l")
m = D("m")

n.z = b
n.s = h
n.y = i
n.r = d
n.u = j
d.p = c
d.w = b
d.o = a
d.y = j
d.r = j
j.t = n
j.o = n
j.y = n
j.w = c
j.p = c
c.w = i
c.x = n
c.t = m
c.p = m
c.q = b
c.o = j
c.u = j
h.q = a
h.z = a
h.r = i
b.w = c
b.p = i
b.u = a
i.w = h
i.t = a
i.u = a
i.o = c
i.r = b
a.p = n
a.t = b
l.p = m
l.w = b
l.o = a
l.y = j
l.r = j
m.w = i
m.x = n
m.t = c
m.p = c
m.q = b
m.o = j
m.u = j
assert m.w.r.u.p.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.y: G = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.t: D = None
        self.q: F = None
        self.p: D = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: H = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.o: D = None
        self.u: H = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: F = None
        self.txt = txt

n = A("n")
d = B("d")
j = C("j")
c = D("c")
h = E("h")
b = F("b")
i = G("i")
a = H("a")
l = B("l")
m = D("m")

n.z = b
n.s = h
n.y = i
n.r = d
n.u = j
d.p = c
d.w = b
d.o = a
d.y = j
d.r = j
j.t = n
j.o = n
j.y = n
j.w = c
j.p = c
c.w = i
c.x = n
c.t = m
c.p = m
c.q = b
c.o = j
c.u = j
h.q = a
h.z = a
h.r = i
b.w = c
b.p = i
b.u = a
i.w = h
i.t = a
i.u = a
i.o = c
i.r = b
a.p = n
a.t = b
l.p = m
l.w = b
l.o = a
l.y = j
l.r = j
m.w = i
m.x = n
m.t = c
m.p = c
m.q = b
m.o = j
m.u = j
assert m.w.r.u.p.u.w.txt == "c"