class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: I = None
        self.t: D = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: I = None
        self.p: H = None
        self.o: J = None
        self.r: G = None
        self.q: J = None
        self.x: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.q: B = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.r: H = None
        self.u: J = None
        self.x: G = None
        self.v: H = None
        self.y: B = None
        self.z: F = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: I = None
        self.w: H = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: B = None
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: I = None
        self.p: H = None
        self.o: J = None
        self.r: G = None
        self.q: J = None
        self.x: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.q: B = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.r: H = None
        self.u: J = None
        self.x: G = None
        self.v: H = None
        self.y: B = None
        self.z: F = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: I = None
        self.w: H = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: B = None
        self.t: H = None
        self.txt = txt

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

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