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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: B = None
        self.q: D = None
        self.o: E = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: F = None
        self.v: H = None
        self.p: F = None
        self.u: D = None
        self.x: G = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: I = None
        self.z: D = None
        self.w: H = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: B = None
        self.q: D = None
        self.o: E = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: F = None
        self.v: H = None
        self.p: F = None
        self.u: D = None
        self.x: G = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: I = None
        self.z: D = None
        self.w: H = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

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