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

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.v: B = None
        self.txt = txt

m = A("m")
f = B("f")
l = C("l")
k = B("k")
c = B("c")
n = A("n")
i = C("i")

m.o = f
m.v = c
m.x = i
f.y = k
f.t = k
f.x = c
l.x = i
l.y = i
l.v = k
k.y = f
k.x = f
k.t = f
c.y = f
c.x = f
c.t = k
n.o = f
n.v = f
n.x = l
i.x = l
i.y = l
i.v = f
assert l.v.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.v: B = None
        self.txt = txt

m = A("m")
f = B("f")
l = C("l")
k = B("k")
c = B("c")
n = A("n")
i = C("i")

m.o = f
m.v = c
m.x = i
f.y = k
f.t = k
f.x = c
l.x = i
l.y = i
l.v = k
k.y = f
k.x = f
k.t = f
c.y = f
c.x = f
c.t = k
n.o = f
n.v = f
n.x = l
i.x = l
i.y = l
i.v = f
assert l.v.x.t.txt == "k"