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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: C = None
        self.o: I = None
        self.w: I = None
        self.s: C = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: C = None
        self.t: F = None
        self.z: G = None
        self.o: H = None
        self.s: J = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: C = None
        self.o: I = None
        self.w: I = None
        self.s: C = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: C = None
        self.t: F = None
        self.z: G = None
        self.o: H = None
        self.s: J = None
        self.x: F = None
        self.txt = txt

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

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

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