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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: E = None
        self.z: A = None
        self.txt = txt

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

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

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

e = A("e")
b = B("b")
m = C("m")
k = D("k")
l = E("l")
a = F("a")
n = G("n")
j = D("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: E = None
        self.z: A = None
        self.txt = txt

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

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

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

e = A("e")
b = B("b")
m = C("m")
k = D("k")
l = E("l")
a = F("a")
n = G("n")
j = D("j")

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