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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.z: E = None
        self.r: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: A = None
        self.x: B = None
        self.q: E = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.z: E = None
        self.r: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: A = None
        self.x: B = None
        self.q: E = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

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

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