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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: F = None
        self.q: A = None
        self.v: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: D = None
        self.v: D = None
        self.s: D = None
        self.o: D = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: F = None
        self.q: A = None
        self.v: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: D = None
        self.v: D = None
        self.s: D = None
        self.o: D = None
        self.u: C = None
        self.txt = txt

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

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