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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.z: C = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.u: G = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: G = None
        self.q: H = None
        self.t: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.z: C = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.u: G = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: G = None
        self.q: H = None
        self.t: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.txt = txt

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

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