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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: F = None
        self.u: F = None
        self.y: F = None
        self.v: C = None
        self.o: F = None
        self.w: G = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.x: A = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: H = None
        self.w: G = None
        self.x: D = None
        self.s: A = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: H = None
        self.z: H = None
        self.o: B = None
        self.t: E = None
        self.p: F = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: A = None
        self.x: A = None
        self.v: G = None
        self.r: C = None
        self.z: A = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: F = None
        self.u: F = None
        self.y: F = None
        self.v: C = None
        self.o: F = None
        self.w: G = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.x: A = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: H = None
        self.w: G = None
        self.x: D = None
        self.s: A = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: H = None
        self.z: H = None
        self.o: B = None
        self.t: E = None
        self.p: F = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: A = None
        self.x: A = None
        self.v: G = None
        self.r: C = None
        self.z: A = None
        self.t: E = None
        self.txt = txt

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

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