class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: B = None
        self.s: B = None
        self.z: C = None
        self.x: B = None
        self.w: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: B = None
        self.u: A = None
        self.w: B = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: G = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.y: E = None
        self.o: A = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: H = None
        self.u: F = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: G = None
        self.o: E = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: B = None
        self.u: A = None
        self.w: B = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: G = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.y: E = None
        self.o: A = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: H = None
        self.u: F = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: G = None
        self.o: E = None
        self.t: I = None
        self.txt = txt

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

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

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