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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: E = None
        self.q: D = None
        self.w: C = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: A = None
        self.x: A = None
        self.q: G = None
        self.s: F = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: E = None
        self.q: D = None
        self.w: C = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: A = None
        self.x: A = None
        self.q: G = None
        self.s: F = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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