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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.x: I = None
        self.v: J = None
        self.u: H = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: C = None
        self.w: H = None
        self.q: D = None
        self.z: B = None
        self.y: I = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: E = None
        self.y: G = None
        self.t: I = None
        self.p: A = None
        self.u: A = None
        self.v: A = None
        self.w: B = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.x: I = None
        self.v: J = None
        self.u: H = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: C = None
        self.w: H = None
        self.q: D = None
        self.z: B = None
        self.y: I = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: E = None
        self.y: G = None
        self.t: I = None
        self.p: A = None
        self.u: A = None
        self.v: A = None
        self.w: B = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

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

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