class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: G = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.v: F = None
        self.s: A = None
        self.t: G = None
        self.q: C = None
        self.o: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: G = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.v: F = None
        self.s: A = None
        self.t: G = None
        self.q: C = None
        self.o: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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