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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: F = None
        self.y: A = None
        self.r: D = None
        self.p: G = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.t: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: F = None
        self.y: A = None
        self.r: D = None
        self.p: G = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.t: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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