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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: A = None
        self.w: F = None
        self.r: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.x: I = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: I = None
        self.o: G = None
        self.q: F = None
        self.x: C = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.t: G = None
        self.y: A = None
        self.q: H = None
        self.o: B = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: B = None
        self.v: D = None
        self.o: E = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: A = None
        self.w: F = None
        self.r: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.x: I = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: I = None
        self.o: G = None
        self.q: F = None
        self.x: C = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.t: G = None
        self.y: A = None
        self.q: H = None
        self.o: B = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: B = None
        self.v: D = None
        self.o: E = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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