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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.w: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.w: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

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

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