```html
const sleep = (delay) => new Promise((r) => setTimeout(r, delay))
const tasks = {
a: {
job: async function () {
await sleep(1000)
console.log('Tasks A running')
},
dependency: ['c', 'b'],
},
b: {
job: async function () {
await sleep(3000)
console.log('Tasks B running')
},
dependency: [],
},
c: {
job: function () {
console.log('Tasks C running')
},
dependency: [],
},
d: {
job: function () {
console.log('Tasks D running')
},
dependency: ['c'],
},
}
function run(tasks) {
// ...Write your answer here
// The params `tasks` can be multiple of task, not just a、b、c、d. so don't answer with `a.job()` etc.
// Answer should not include keyword of a/b/c/d
}
run(tasks)
```