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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: A = None
        self.s: E = None
        self.x: D = None
        self.w: D = None
        self.o: E = None
        self.r: E = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.q: F = None
        self.r: H = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: H = None
        self.t: I = None
        self.p: C = None
        self.w: D = None
        self.v: G = None
        self.u: I = None
        self.y: E = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.w: E = None
        self.v: D = None
        self.y: E = None
        self.o: D = None
        self.q: J = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: G = None
        self.p: A = None
        self.z: D = None
        self.t: G = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: H = None
        self.q: A = None
        self.r: D = None
        self.w: G = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: A = None
        self.s: E = None
        self.x: D = None
        self.w: D = None
        self.o: E = None
        self.r: E = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.q: F = None
        self.r: H = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: H = None
        self.t: I = None
        self.p: C = None
        self.w: D = None
        self.v: G = None
        self.u: I = None
        self.y: E = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.w: E = None
        self.v: D = None
        self.y: E = None
        self.o: D = None
        self.q: J = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: G = None
        self.p: A = None
        self.z: D = None
        self.t: G = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: H = None
        self.q: A = None
        self.r: D = None
        self.w: G = None
        self.y: B = None
        self.txt = txt

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

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