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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: G = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: H = None
        self.s: G = None
        self.t: D = None
        self.v: D = None
        self.z: H = None
        self.o: D = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: A = None
        self.w: F = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: G = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: H = None
        self.s: G = None
        self.t: D = None
        self.v: D = None
        self.z: H = None
        self.o: D = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: A = None
        self.w: F = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: H = None
        self.txt = txt

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

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