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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: G = None
        self.o: G = None
        self.z: J = None
        self.u: C = None
        self.x: F = None
        self.q: A = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: J = None
        self.r: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: G = None
        self.t: B = None
        self.p: I = None
        self.w: I = None
        self.q: G = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: G = None
        self.o: G = None
        self.z: J = None
        self.u: C = None
        self.x: F = None
        self.q: A = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: J = None
        self.r: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: G = None
        self.t: B = None
        self.p: I = None
        self.w: I = None
        self.q: G = None
        self.y: D = None
        self.txt = txt

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

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