Given two numbers represented by two linked lists of size N and M. The task is to return a sum list.
The sum list is a linked list representation of the addition of two input numbers from the last.

#### Input

The first line inputs N and M ,the size of two linked lists.
The second line inputs the value of N nodes of 1st linked list.
The third line inputs the value of M nodes of 2nd linked list.\

#### Constraints:

1 <= N, M <= 5000

#### Output

Print the sum list in new line.

### Example

```2 3
4 5
3 4 5
```

```3 9 0
```

#### Explaination:

```For the given two linked
list (4 5) and (3 4 5), after adding
list will be (3 9 0).```

## Solution of Add two numbers represented by linked lists in java:–

```import java.util.*;
import java.lang.*;
import java.io.*;

class Node {
int data;
Node next;

Node(int data) {
this.data = data;
this.next = null;
}
}
public class Main
{
{
while(currNode!=null)
{
System.out.print(currNode.data+" ");
currNode=currNode.next;
}
}
{
Node NewNode=new Node(data);
return NewNode;
}
{
Node dummy=new Node(0);
Node curr=dummy;

int sum=0,carry=0;
while(c1!=null || c2!=null)
{
int x=(c1==null?0:c1.data);
int y=(c2==null?0:c2.data);
sum=x+y+carry;
carry=sum/10;
curr.next=new Node(sum%10);
curr=curr.next;

if(c1!=null)
c1=c1.next;

if(c2!=null)
c2=c2.next;
}
if(carry>0)
{
curr.next=new Node(carry);
}
return dummy.next;
}
{
Node prev=null;
while(curr!=null)
{
Node temp=curr.next;
curr.next=prev;
prev=curr;
curr=temp;
}
return prev;
}
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int m=sc.nextInt();
for(int i=0;i<n;i++)
{
int data=sc.nextInt();