[TASK]:
You will be given lines of pseudocode, your task is to write the corresponding C++ code. The pseudocode will provide detailed description of the c++ code line by line. The pseudocode is garanteed to be correct and complete.

[INSTRUCTION]:
The following libraries are already included in the code.
```cpp
#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <fstream>
#include <climits>
#include <cassert>
#include <iomanip>
#include <sstream>
#include <bitset>
using namespace std;
```
Do not include them in your code again. Please surround your code with ```cpp and ``` markers. Note that the code should correspond to the pseudocode line by line.

[PSEUDOCODE]:
a = integer array of length 110
b = integer array of length 110
define the main function
    s = string
    read one line into s
    num, ten = integers with num value of 0 and ten value of 1
    for i = size of s-1 to 0 inclusive descending
        if s[i] equals = then break
        if s[i] is less than '9' and greater than '0'
            x = integer with value of s[i] - '0'
            increase num by x*ten
            set ten to ten * 10
        end of the block
    end of the block
    cnt = integer with value of 0
    set a[0] to 1
    for i = 0 to size of s exclusive
        if s[i] equals '+'
            increase cnt by 1 and set a[cnt] to 1
        else if s[i] equals '-'
            increase cnt by 1 and set a[cnt] to 0
        end of the block
    end of the block
    x = integer with value of 0
    for i =0 to cnt inclusive
        set b[i] to 1
        if a[i]
            increase x by b[i]
        else
            decrease x by b[i]
    end of the block
    set x to num - x
    for i = 0 to cnt inclusive
        if x is less than 0
            if a[i] equals 0 and b[i] is less than num
                k = integer with value of the minimum of num-b[i] and negative x
                increase b[i] by k
                increase x by k
            end of the block
        else if x is greater than 0
            if a[i] equals 1 and b[i] is less than num
                k = integer with value of the minimum of num-b[i] and x
                increase b[i] by k
                decrease x by b[i]
            end of the block
        else
            break
    end of the block
    set x to 0
    for i = 0 to count inclusive
        if a[i]
            increase x by b[i]
        else
            decrease x by b[i]
    end of the block
    if x does not equal num
        print Impossible
        return to indicate successful execution
    end of the block
    print Possible
    set cnt to 0
    for i = 0 to size of s exclusive
        if s[i] equals '+' or '-' or '=' print b[cnt] space s[i] space then increase cnt by 1
    end of the block
    print num
    return to indicate successful execution
end of the block

[CODE]:

int a[110];
int b[110];
int main() {
    string s;
    getline(cin, s);
    int num = 0, ten = 1;
    for (int i = s.size() - 1; i >= 0; i--) {
        if (s[i] == '=') break;
        if (s[i] <= '9' && s[i] >= '0') {
            int x = s[i] - '0';
            num += x * ten;
            ten *= 10;
        }
    }
    int cnt = 0;
    a[0] = 1;
    for (int i = 0; i < s.size(); i++) {
        if (s[i] == '+') {
            a[++cnt] = 1;
        } else if (s[i] == '-') {
            a[++cnt] = 0;
        }
    }
    int x = 0;
    for (int i = 0; i <= cnt; i++) {
        b[i] = 1;
        if (a[i])
            x += b[i];
        else
            x -= b[i];
    }
    x = num - x;
    for (int i = 0; i <= cnt; i++) {
        if (x < 0) {
            if (a[i] == 0 && b[i] < num) {
                int k = min(num - b[i], -x);
                b[i] += k;
                x += k;
            }
        } else if (x > 0) {
            if (a[i] == 1 && b[i] < num) {
                int k = min(num - b[i], x);
                b[i] += k;
                x -= k;
            }
        } else
            break;
    }
    x = 0;
    for (int i = 0; i <= cnt; i++) {
        if (a[i])
            x += b[i];
        else
            x -= b[i];
    }
    if (x != num) {
        cout << "Impossible" << endl;
        return 0;
    }
    cout << "Possible" << endl;
    cnt = 0;
    for (int i = 0; i < s.size(); i++) {
        if (s[i] == '+' || s[i] == '-' || s[i] == '=') { cout << b[cnt++] << " " << s[i] << " "; }
    }
    cout << num << endl;
    return 0;
}