class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: A = None
        self.txt = txt

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

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

k = A("k")
n = B("n")
e = C("e")
c = A("c")
f = B("f")
b = B("b")
l = C("l")
a = B("a")

k.v = b
k.u = c
n.o = l
n.s = f
n.u = a
e.s = k
e.v = c
c.v = n
c.u = k
f.o = l
f.s = b
f.u = b
b.o = e
b.s = f
b.u = a
l.s = c
l.v = k
a.o = l
a.s = b
a.u = b
assert n.o.s.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: A = None
        self.txt = txt

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

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

k = A("k")
n = B("n")
e = C("e")
c = A("c")
f = B("f")
b = B("b")
l = C("l")
a = B("a")

k.v = b
k.u = c
n.o = l
n.s = f
n.u = a
e.s = k
e.v = c
c.v = n
c.u = k
f.o = l
f.s = b
f.u = b
b.o = e
b.s = f
b.u = a
l.s = c
l.v = k
a.o = l
a.s = b
a.u = b
assert n.o.s.u.u.txt == "c"