Now that we've learnt about weighted graphs and single-source shortest-path algorithms like Dijkstra and Bellman Ford, it's time to implement them. You can work in any programming language of your choice - Python, C++, Java, or anything else you want. Let's get started!

# Problem Statement

You are given an undirected weighted graph with n nodes and m edges. The nodes are numbered from 0 to n-1. Find the shortest distance from the source (node 0) to all other nodes. If there is no path from the source to a particular node, output INF instead (for infinity).

**Constraints**: n \leq 10^5 and m \leq 10^6.