class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: H = None
        self.t: E = None
        self.v: F = None
        self.s: J = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: H = None
        self.q: D = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: G = None
        self.s: J = None
        self.p: B = None
        self.y: D = None
        self.w: J = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: H = None
        self.q: D = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: G = None
        self.s: J = None
        self.p: B = None
        self.y: D = None
        self.w: J = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

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

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

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