class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: B = None
        self.p: C = None
        self.w: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: C = None
        self.t: C = None
        self.s: A = None
        self.p: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: B = None
        self.p: C = None
        self.w: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: C = None
        self.t: C = None
        self.s: A = None
        self.p: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: B = None
        self.txt = txt

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

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