class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: G = None
        self.r: G = None
        self.w: I = None
        self.v: I = None
        self.q: A = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: B = None
        self.z: F = None
        self.y: F = None
        self.w: F = None
        self.s: D = None
        self.o: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: G = None
        self.r: G = None
        self.w: I = None
        self.v: I = None
        self.q: A = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: B = None
        self.z: F = None
        self.y: F = None
        self.w: F = None
        self.s: D = None
        self.o: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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