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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: H = None
        self.x: F = None
        self.q: G = None
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: H = None
        self.x: F = None
        self.q: G = None
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.q: G = None
        self.txt = txt

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

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