class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: C = None
        self.s: F = None
        self.p: F = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: E = None
        self.t: E = None
        self.r: E = None
        self.w: G = None
        self.u: F = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: D = None
        self.x: C = None
        self.p: D = None
        self.s: A = None
        self.r: C = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.t: G = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: E = None
        self.t: E = None
        self.r: E = None
        self.w: G = None
        self.u: F = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: D = None
        self.x: C = None
        self.p: D = None
        self.s: A = None
        self.r: C = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.t: G = None
        self.p: A = None
        self.txt = txt

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

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

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

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