class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.r: G = None
        self.s: F = None
        self.y: B = None
        self.o: A = None
        self.t: C = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.z: D = None
        self.v: A = None
        self.u: E = None
        self.r: I = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.r: G = None
        self.s: F = None
        self.y: B = None
        self.o: A = None
        self.t: C = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.z: D = None
        self.v: A = None
        self.u: E = None
        self.r: I = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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