class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: E = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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