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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.u: H = None
        self.s: A = None
        self.p: H = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.v: E = None
        self.z: E = None
        self.w: H = None
        self.x: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.y: D = None
        self.r: B = None
        self.v: I = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: C = None
        self.o: D = None
        self.q: I = None
        self.s: C = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: G = None
        self.o: F = None
        self.w: A = None
        self.y: E = None
        self.v: E = None
        self.p: H = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.u: H = None
        self.s: A = None
        self.p: H = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.v: E = None
        self.z: E = None
        self.w: H = None
        self.x: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.y: D = None
        self.r: B = None
        self.v: I = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: C = None
        self.o: D = None
        self.q: I = None
        self.s: C = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: G = None
        self.o: F = None
        self.w: A = None
        self.y: E = None
        self.v: E = None
        self.p: H = None
        self.x: A = None
        self.txt = txt

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

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