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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: C = None
        self.r: G = None
        self.v: G = None
        self.x: I = None
        self.w: D = None
        self.o: H = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.o: D = None
        self.q: D = None
        self.x: A = None
        self.p: D = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: I = None
        self.w: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: D = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: C = None
        self.r: G = None
        self.v: G = None
        self.x: I = None
        self.w: D = None
        self.o: H = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.o: D = None
        self.q: D = None
        self.x: A = None
        self.p: D = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: I = None
        self.w: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: D = None
        self.s: C = None
        self.txt = txt

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

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