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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: J = None
        self.v: D = None
        self.o: D = None
        self.s: J = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: G = None
        self.t: D = None
        self.r: E = None
        self.w: B = None
        self.q: I = None
        self.s: E = None
        self.z: I = None
        self.v: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.q: D = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: C = None
        self.q: I = None
        self.u: C = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: E = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: F = None
        self.y: G = None
        self.q: H = None
        self.r: C = None
        self.x: I = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: J = None
        self.v: D = None
        self.o: D = None
        self.s: J = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: G = None
        self.t: D = None
        self.r: E = None
        self.w: B = None
        self.q: I = None
        self.s: E = None
        self.z: I = None
        self.v: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.q: D = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: C = None
        self.q: I = None
        self.u: C = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: E = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: F = None
        self.y: G = None
        self.q: H = None
        self.r: C = None
        self.x: I = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

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

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