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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.t: B = None
        self.txt = txt

n = A("n")
l = B("l")
f = C("f")
k = A("k")
g = C("g")
e = A("e")
a = B("a")
b = A("b")
m = C("m")
i = C("i")

n.u = f
l.o = b
l.v = g
l.z = e
f.x = n
f.o = i
f.t = l
k.u = f
g.x = k
g.o = i
g.t = l
e.u = i
a.o = e
a.v = f
a.z = n
b.u = g
m.x = b
m.o = g
m.t = a
i.x = k
i.o = m
i.t = a
assert e.u.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.t: B = None
        self.txt = txt

n = A("n")
l = B("l")
f = C("f")
k = A("k")
g = C("g")
e = A("e")
a = B("a")
b = A("b")
m = C("m")
i = C("i")

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