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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: H = None
        self.x: B = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: C = None
        self.z: I = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.y: A = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: E = None
        self.p: F = None
        self.s: F = None
        self.x: F = None
        self.t: H = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: H = None
        self.x: B = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: C = None
        self.z: I = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.y: A = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: E = None
        self.p: F = None
        self.s: F = None
        self.x: F = None
        self.t: H = None
        self.v: F = None
        self.txt = txt

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

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