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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: H = None
        self.w: B = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: G = None
        self.x: B = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: J = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: D = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.o: I = None
        self.y: H = None
        self.v: D = None
        self.u: A = None
        self.p: E = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: H = None
        self.w: B = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: G = None
        self.x: B = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: J = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: D = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.o: I = None
        self.y: H = None
        self.v: D = None
        self.u: A = None
        self.p: E = None
        self.s: D = None
        self.txt = txt

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

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