class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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