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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: H = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: H = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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