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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: E = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: E = None
        self.r: H = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: B = None
        self.r: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: E = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: E = None
        self.r: H = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: B = None
        self.r: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.txt = txt

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

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