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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.t: D = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.t: D = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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