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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.p: B = None
        self.u: E = None
        self.s: A = None
        self.z: C = None
        self.q: I = None
        self.w: G = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.t: F = None
        self.p: B = None
        self.z: A = None
        self.q: I = None
        self.u: G = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: C = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: F = None
        self.t: C = None
        self.y: B = None
        self.w: E = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.p: B = None
        self.u: E = None
        self.s: A = None
        self.z: C = None
        self.q: I = None
        self.w: G = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.t: F = None
        self.p: B = None
        self.z: A = None
        self.q: I = None
        self.u: G = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: C = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: F = None
        self.t: C = None
        self.y: B = None
        self.w: E = None
        self.v: B = None
        self.txt = txt

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

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