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

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: G = None
        self.v: H = None
        self.y: H = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.txt = txt

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

h.x = b
h.u = b
h.w = b
h.q = a
h.r = a
h.y = l
h.v = k
h.t = i
b.x = m
b.s = m
b.o = a
b.v = a
b.y = k
b.p = c
b.z = c
b.r = i
b.t = h
n.q = m
n.t = m
l.o = a
c.u = a
c.x = k
c.v = g
c.y = g
c.q = l
i.w = k
i.p = a
i.u = n
i.x = l
i.t = m
k.y = g
k.u = g
k.r = g
k.o = g
k.z = m
k.s = n
k.w = c
k.t = c
k.v = i
k.q = i
g.v = k
a.q = g
a.x = g
a.o = i
a.r = h
a.y = k
a.s = n
a.p = c
m.x = l
m.z = h
assert b.t.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: I = None
        self.u: B = None
        self.r: I = None
        self.y: D = None
        self.w: B = None
        self.v: G = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: G = None
        self.v: H = None
        self.y: H = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.txt = txt

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

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