class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: J = None
        self.q: G = None
        self.r: E = None
        self.y: F = None
        self.x: B = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: I = None
        self.r: F = None
        self.y: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: I = None
        self.z: D = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.x: A = None
        self.z: B = None
        self.q: I = None
        self.o: F = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: G = None
        self.z: C = None
        self.y: A = None
        self.v: I = None
        self.r: E = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.x: C = None
        self.p: E = None
        self.r: B = None
        self.s: A = None
        self.w: B = None
        self.z: H = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: I = None
        self.r: F = None
        self.y: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: I = None
        self.z: D = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.x: A = None
        self.z: B = None
        self.q: I = None
        self.o: F = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: G = None
        self.z: C = None
        self.y: A = None
        self.v: I = None
        self.r: E = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.x: C = None
        self.p: E = None
        self.r: B = None
        self.s: A = None
        self.w: B = None
        self.z: H = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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