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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: C = None
        self.x: A = None
        self.t: G = None
        self.w: A = None
        self.s: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: C = None
        self.x: A = None
        self.t: G = None
        self.w: A = None
        self.s: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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