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

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

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

c = A("c")
k = B("k")
i = C("i")
a = B("a")
h = C("h")
n = A("n")
l = C("l")

c.v = i
c.y = n
k.t = l
k.w = n
k.u = a
i.t = k
i.u = l
i.w = l
a.t = h
a.w = n
a.u = k
h.t = a
h.u = i
h.w = i
n.v = l
n.y = c
l.t = a
l.u = h
l.w = h
assert i.u.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.txt = txt

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

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

c = A("c")
k = B("k")
i = C("i")
a = B("a")
h = C("h")
n = A("n")
l = C("l")

c.v = i
c.y = n
k.t = l
k.w = n
k.u = a
i.t = k
i.u = l
i.w = l
a.t = h
a.w = n
a.u = k
h.t = a
h.u = i
h.w = i
n.v = l
n.y = c
l.t = a
l.u = h
l.w = h
assert i.u.t.u.txt == "k"