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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: D = None
        self.y: F = None
        self.w: D = None
        self.v: A = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: G = None
        self.o: G = None
        self.z: D = None
        self.t: A = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: A = None
        self.z: F = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: I = None
        self.w: B = None
        self.p: H = None
        self.y: D = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: I = None
        self.v: F = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: F = None
        self.r: C = None
        self.z: F = None
        self.txt = txt

m = A("m")
k = B("k")
a = C("a")
b = D("b")
i = E("i")
j = F("j")
n = G("n")
f = H("f")
l = I("l")

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: D = None
        self.y: F = None
        self.w: D = None
        self.v: A = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: G = None
        self.o: G = None
        self.z: D = None
        self.t: A = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: A = None
        self.z: F = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: I = None
        self.w: B = None
        self.p: H = None
        self.y: D = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: I = None
        self.v: F = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: F = None
        self.r: C = None
        self.z: F = None
        self.txt = txt

m = A("m")
k = B("k")
a = C("a")
b = D("b")
i = E("i")
j = F("j")
n = G("n")
f = H("f")
l = I("l")

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