class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: G = None
        self.q: H = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: A = None
        self.s: H = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: G = None
        self.q: H = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: A = None
        self.s: H = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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