class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.s: E = None
        self.u: F = None
        self.o: E = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: G = None
        self.x: I = None
        self.v: J = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: J = None
        self.t: B = None
        self.x: B = None
        self.v: C = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: D = None
        self.v: G = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: G = None
        self.x: I = None
        self.v: J = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: J = None
        self.t: B = None
        self.x: B = None
        self.v: C = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: D = None
        self.v: G = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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