#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define nl "\n"
#define OO 0x3f3f3f3f
using namespace std;
const int dx[] = {0, 0, 1, -1, -1, -1, 1, 1};
const int dy[] = {1, -1, 0, 0, 1, -1, 1, -1};
const int N = 1e5 + 5, M = 2e5 + 5;
void ta2to2a()
{
    ios_base::sync_with_stdio(false), cout.tie(nullptr), cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
void solve()
{
    int n, k;
    cin >> n >> k;
    vector<ll> a(n);
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
    }
    vector<ll> suff(n + 1);
    suff[n] = 0;
    for (int i = n - 1; i >= 0; i--)
    {
        suff[i] = a[i] + suff[i + 1] - (i + k + 1 <= n ? suff[i + k + 1] : 0);
    }
    for (int i = 0; i <= n; i++)
    {
        cout << suff[i] << " ";
    }
    cout << nl;
    ll turns = 0;
    for (int i = 0; i <= n; i++)
    {
        turns += suff[i];
    }
    cout << turns << " ";
    if (turns % 2 == 0)
    {
        cout << "Bob" << nl;
    }
    else
    {
        cout << "Alice" << nl;
    }
}
int main()
{
    ta2to2a();
    int t = 1;
    cin >> t;
    while (t--)
    {
        solve();
    }
}