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

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

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

e = A("e")
j = B("j")
a = C("a")
n = A("n")
f = C("f")
d = A("d")
b = B("b")

e.x = b
e.v = j
e.o = j
j.w = f
a.x = d
a.s = n
a.u = n
n.x = j
n.v = j
n.o = b
f.x = n
f.s = n
f.u = e
d.x = j
d.o = j
d.v = b
b.w = f
assert b.w.u.x.w.u.x.w.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: B = None
        self.o: B = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
a = C("a")
n = A("n")
f = C("f")
d = A("d")
b = B("b")

e.x = b
e.v = j
e.o = j
j.w = f
a.x = d
a.s = n
a.u = n
n.x = j
n.v = j
n.o = b
f.x = n
f.s = n
f.u = e
d.x = j
d.o = j
d.v = b
b.w = f
assert b.w.u.x.w.u.x.w.txt == "f"