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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: D = None
        self.p: C = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

n = A("n")
c = B("c")
b = C("b")
i = D("i")
e = E("e")
l = F("l")
k = G("k")
h = H("h")
d = E("d")

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: D = None
        self.p: C = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

n = A("n")
c = B("c")
b = C("b")
i = D("i")
e = E("e")
l = F("l")
k = G("k")
h = H("h")
d = E("d")

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