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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: H = None
        self.x: A = None
        self.w: C = None
        self.p: H = None
        self.z: F = None
        self.t: D = None
        self.r: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: B = None
        self.r: A = None
        self.y: H = None
        self.q: C = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.q: F = None
        self.v: F = None
        self.p: F = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: D = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: H = None
        self.x: A = None
        self.w: C = None
        self.p: H = None
        self.z: F = None
        self.t: D = None
        self.r: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: B = None
        self.r: A = None
        self.y: H = None
        self.q: C = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.q: F = None
        self.v: F = None
        self.p: F = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: D = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

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

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

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