class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: F = None
        self.q: J = None
        self.u: F = None
        self.y: I = None
        self.r: J = None
        self.o: A = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: B = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: J = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: C = None
        self.t: C = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: F = None
        self.q: J = None
        self.u: F = None
        self.y: I = None
        self.r: J = None
        self.o: A = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: B = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: J = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: C = None
        self.t: C = None
        self.o: G = None
        self.txt = txt

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

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

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

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