class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: B = None
        self.v: G = None
        self.y: G = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.p: F = None
        self.y: E = None
        self.r: C = None
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: H = None
        self.r: C = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.p: F = None
        self.y: E = None
        self.r: C = None
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: H = None
        self.r: C = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: F = None
        self.txt = txt

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

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