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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: F = None
        self.q: F = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: F = None
        self.q: F = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.txt = txt

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

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