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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.r: F = None
        self.p: C = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: C = None
        self.y: B = None
        self.s: H = None
        self.p: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: B = None
        self.q: G = None
        self.txt = txt

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

h = A("h")
i = B("i")
e = C("e")
k = D("k")
f = E("f")
l = F("l")
b = G("b")
n = H("n")
a = I("a")

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.r: F = None
        self.p: C = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: C = None
        self.y: B = None
        self.s: H = None
        self.p: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: B = None
        self.q: G = None
        self.txt = txt

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

h = A("h")
i = B("i")
e = C("e")
k = D("k")
f = E("f")
l = F("l")
b = G("b")
n = H("n")
a = I("a")

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