class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: C = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: F = None
        self.u: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: F = None
        self.x: B = None
        self.v: H = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.v: F = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: E = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.s: A = None
        self.p: E = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: F = None
        self.u: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: F = None
        self.x: B = None
        self.v: H = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.v: F = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: E = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.s: A = None
        self.p: E = None
        self.x: C = None
        self.txt = txt

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

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