class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: E = None
        self.v: F = None
        self.s: E = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: F = None
        self.u: F = None
        self.q: H = None
        self.o: H = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: I = None
        self.p: B = None
        self.x: C = None
        self.w: F = None
        self.z: F = None
        self.y: F = None
        self.q: I = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: B = None
        self.p: E = None
        self.o: H = None
        self.s: I = None
        self.v: I = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: D = None
        self.y: H = None
        self.z: B = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: G = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: F = None
        self.u: F = None
        self.q: H = None
        self.o: H = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: I = None
        self.p: B = None
        self.x: C = None
        self.w: F = None
        self.z: F = None
        self.y: F = None
        self.q: I = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: B = None
        self.p: E = None
        self.o: H = None
        self.s: I = None
        self.v: I = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: D = None
        self.y: H = None
        self.z: B = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: G = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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