class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: B = None
        self.s: F = None
        self.p: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: H = None
        self.t: I = None
        self.x: J = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: F = None
        self.x: E = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: D = None
        self.w: A = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: A = None
        self.t: F = None
        self.o: H = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: A = None
        self.t: E = None
        self.txt = txt

m = A("m")
b = B("b")
f = C("f")
l = D("l")
d = E("d")
a = F("a")
g = G("g")
n = H("n")
j = I("j")
e = J("e")

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: H = None
        self.t: I = None
        self.x: J = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: F = None
        self.x: E = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: D = None
        self.w: A = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: A = None
        self.t: F = None
        self.o: H = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: A = None
        self.t: E = None
        self.txt = txt

m = A("m")
b = B("b")
f = C("f")
l = D("l")
d = E("d")
a = F("a")
g = G("g")
n = H("n")
j = I("j")
e = J("e")

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