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

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

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

j = A("j")
c = B("c")
l = C("l")
k = A("k")
f = A("f")
e = A("e")
i = C("i")
b = C("b")
m = A("m")
h = A("h")

j.v = c
j.o = l
c.u = i
c.t = b
c.o = h
l.w = i
k.v = c
k.o = l
f.v = c
f.o = b
e.v = c
e.o = i
i.w = b
b.w = i
m.v = c
m.o = i
h.v = c
h.o = l
assert b.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.txt = txt

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

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

j = A("j")
c = B("c")
l = C("l")
k = A("k")
f = A("f")
e = A("e")
i = C("i")
b = C("b")
m = A("m")
h = A("h")

j.v = c
j.o = l
c.u = i
c.t = b
c.o = h
l.w = i
k.v = c
k.o = l
f.v = c
f.o = b
e.v = c
e.o = i
i.w = b
b.w = i
m.v = c
m.o = i
h.v = c
h.o = l
assert b.w.w.w.txt == "i"