class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: G = None
        self.u: F = None
        self.p: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: D = None
        self.p: B = None
        self.t: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: G = None
        self.u: F = None
        self.p: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: D = None
        self.p: B = None
        self.t: E = None
        self.w: A = None
        self.txt = txt

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

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