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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: E = None
        self.u: E = None
        self.v: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: D = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: E = None
        self.u: E = None
        self.v: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: D = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

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

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