class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: D = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: E = None
        self.r: E = None
        self.p: B = None
        self.x: E = None
        self.s: C = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: H = None
        self.x: G = None
        self.u: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: E = None
        self.r: E = None
        self.p: B = None
        self.x: E = None
        self.s: C = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: H = None
        self.x: G = None
        self.u: I = None
        self.txt = txt

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

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