#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll L, R;
vector <ll> weights;
void read() {
    cin >> L >> R;
}
void precompute() {
    weights.push_back(1);
    weights.push_back(2);
    while (weights.back() <= 1e18) {
        int sz = weights.size();
        weights.push_back(weights[sz-1] + weights[sz-2]);
        if (weights.back() > 1e18) break;
    }
}
void solve() {
    for (ll i = L; i<=R; ++i) {
        vector <ll> left, right;

        ll x = i;
        ll closest = weights[0];
        while (x != 0) {
            for (ll w : weights) {
                if (abs(w - abs(x)) < abs(closest - abs(x))) {
                    closest = w;
                }
            }
            if (x > 0) {
                right.push_back(closest);
                x -= closest;
            } else {
                left.push_back(closest);
                x += closest;
            }
        }

        left.push_back(i);
        sort(left.rbegin(), left.rend());
        sort(right.rbegin(), right.rend());

        cout << left.size() + right.size() << "\n";

        cout << left.size();
        for (ll x : left) cout << " " << x;
        cout << "\n" << right.size();
        for (ll x : right) cout << " " << x;
        cout << "\n";
    }
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);

    read();
    precompute();
    solve();

    return 0;
}
