#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const int N = 5e5 + 5;
vector<int> tree[4 * N];
int arr[N];
int arr2[N];

void mer(vector<int> &v1, vector<int> &v2, vector<int> &v3)
{
    int idx1 = 0, idx2 = 0;
    while(idx1 < v1.size() && idx2 < v2.size())
    {
        if(v1[idx1] <= v2[idx2])
        {
            v3.push_back(v1[idx1]);
            idx1++;
        }
        else
        {
            v3.push_back(v2[idx2]);
            idx2++;
        }
    }
    while(idx1 < v1.size())
    {
        v3.push_back(v1[idx1]);
        idx1++;
    }
    while(idx2 < v2.size())
    {
        v3.push_back(v2[idx2]);
        idx2++;
    }
}

void build(int node, int l, int r)
{
    if(l == r)
    {
        tree[node].push_back(arr[l]);
        return;
    }
    int mid = (l + r) >> 1;
    build(node << 1, l, mid);
    build((node << 1) + 1, mid + 1, r);
    mer(tree[(node << 1)], tree[(node << 1) + 1], tree[node]);
}

vector<int> get_range(int node, int l, int r, int st, int en)
{
    if(st > r || en < l)
        return vector<int>();
    if(st <= l && r <= en)
    {
        return tree[node];
    }
    int mid = (l + r) >> 1;
    vector<int> ret1 = get_range((node << 1), l, mid, st, en);
    vector<int> ret2 = get_range((node << 1) + 1, mid + 1, r, st, en);
    vector<int> ret;
    mer(ret1, ret2, ret);
    return ret;
}

int main ()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int m, k, n, s;
    cin >> m >> k >> n >> s;
    for(int i = 1; i <= m; i++)
        cin >> arr[i];
    for(int i = 0; i < s; i++)
        cin >> arr2[i];
    sort(arr2, arr2 + s);
    build(1, 1, m);
    int rem = m - n * k;
    int sol = INT_MAX;
    vector<int> out;
    for(int i = 1; i <= n; i++)
    {
        int st_pos = k * (i - 1) + 1;
        int st = st_pos + k - 1, en = min(m, st_pos + k - 1 + rem), ans = -1;
        while(st <= en)
        {
            int mid = (st + en) >> 1;
            vector<int> vec = get_range(1, 1, m, st_pos, mid);
            int idx1 = 0, idx2 = 0;
            while(idx1 < vec.size() && idx2 < s)
            {
                if(vec[idx1] == arr2[idx2])
                    idx2++;
                idx1++;
            }
            if(idx2 == s)
            {
                ans = mid;
                en = mid - 1;
            }
            else
            {
                st = mid + 1;
            }
        }
        if(ans == -1)
            continue;
        int len = (ans - st_pos + 1);
        int cur = len - k;
        if(cur < sol)
        {
            sol = len - k;
            map<int, int> mark;
            vector<int> vec = get_range(1, 1, m, st_pos, ans);
            int idx1 = 0, idx2 = 0;
            while(idx1 < vec.size())
            {
                if(idx2 < s && vec[idx1] == arr2[idx2])
                    idx2++;
                else
                    mark[vec[idx1]]++;
                idx1++;
            }
            out.clear();

            for(int j = st_pos; j <= ans && cur; j++)
            {
                if(mark.find(arr[j]) == mark.end())
                    continue;
                out.push_back(j);
                mark[arr[j]]--;
                if(mark[arr[j]] == 0)
                    mark.erase(mark.find(arr[j]));
                cur--;
            }
            int idx = k * (n) + 1 + len - k;
            for(int j = idx; j <= m; j++)
                out.push_back(j);
        }
    }
    if(sol == INT_MAX)
        cout << -1;
    else
    {
        cout << out.size() << '\n';
        for(auto &element: out)
            cout << element << ' ';
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const int N = 5e5 + 5;
vector<int> tree[N];
int arr[N];
int arr2[N];

void mer(vector<int> &v1, vector<int> &v2, vector<int> &v3)
{
    int idx1 = 0, idx2 = 0;
    while(idx1 < v1.size() && idx2 < v2.size())
    {
        if(v1[idx1] <= v2[idx2])
        {
            v3.push_back(v1[idx1]);
            idx1++;
        }
        else
        {
            v3.push_back(v2[idx2]);
            idx2++;
        }
    }
    while(idx1 < v1.size())
    {
        v3.push_back(v1[idx1]);
        idx1++;
    }
    while(idx2 < v2.size())
    {
        v3.push_back(v2[idx2]);
        idx2++;
    }
}

void build(int node, int l, int r)
{
    if(l == r)
    {
        tree[node].push_back(arr[l]);
        return;
    }
    int mid = (l + r) >> 1;
    build(node << 1, l, mid);
    build((node << 1) + 1, mid + 1, r);
    mer(tree[(node << 1)], tree[(node << 1) + 1], tree[node]);
}

vector<int> get_range(int node, int l, int r, int st, int en)
{
    if(st > r || en < l)
        return vector<int>();
    if(st <= l && r <= en)
    {
        return tree[node];
    }
    int mid = (l + r) >> 1;
    vector<int> ret1 = get_range((node << 1), l, mid, st, en);
    vector<int> ret2 = get_range((node << 1) + 1, mid + 1, r, st, en);
    vector<int> ret;
    mer(ret1, ret2, ret);
    return ret;
}

int main ()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int m, k, n, s;
    cin >> m >> k >> n >> s;
    for(int i = 1; i <= m; i++)
        cin >> arr[i];
    for(int i = 0; i < s; i++)
        cin >> arr2[i];
    sort(arr2, arr2 + s);
    build(1, 1, m);
    int rem = m - n * k;
    int sol = INT_MAX;
    vector<int> out;
    for(int i = 1; i <= n; i++)
    {
        int st_pos = k * (i - 1) + 1;
        int st = st_pos + k - 1, en = min(m, st_pos + k - 1 + rem), ans = -1;
        while(st <= en)
        {
            int mid = (st + en) >> 1;
            vector<int> vec = get_range(1, 1, m, st_pos, mid);
            int idx1 = 0, idx2 = 0;
            while(idx1 < vec.size() && idx2 < s)
            {
                if(vec[idx1] == arr2[idx2])
                    idx2++;
                idx1++;
            }
            if(idx2 == s)
            {
                ans = mid;
                en = mid - 1;
            }
            else
            {
                st = mid + 1;
            }
        }
        if(ans == -1)
            continue;
        cout << i << ' ' << st_pos << ' ' << ans << '\n';
        int len = (ans - st_pos + 1);
        int cur = len - k;
        if(cur < sol)
        {
            sol = len - k;
            map<int, int> mark;
            vector<int> vec = get_range(1, 1, m, st_pos, ans);
            int idx1 = 0, idx2 = 0;
            while(idx1 < vec.size())
            {
                if(idx2 < s && vec[idx1] == arr2[idx2])
                    idx2++;
                else
                    mark[vec[idx1]]++;
                idx1++;
            }
            out.clear();

            for(int j = st_pos; j <= ans && cur; j++)
            {
                if(mark.find(arr[j]) == mark.end())
                    continue;
                out.push_back(j);
                mark[arr[j]]--;
                if(mark[arr[j]] == 0)
                    mark.erase(mark.find(arr[j]));
                cur--;
            }
            int idx = k * (n) + 1 + len - k;
            for(int j = idx; j <= m; j++)
                out.push_back(j);
        }
    }
    if(sol == INT_MAX)
        cout << -1;
    else
    {
        cout << out.size() << '\n';
        for(auto &element: out)
            cout << element << ' ';
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const int N = 5e5 + 5;
vector<int> tree[4 * N];
int arr[N];
int arr2[N];

void mer(vector<int> &v1, vector<int> &v2, vector<int> &v3)
{
    int idx1 = 0, idx2 = 0;
    while(idx1 < v1.size() && idx2 < v2.size())
    {
        if(v1[idx1] <= v2[idx2])
        {
            v3.push_back(v1[idx1]);
            idx1++;
        }
        else
        {
            v3.push_back(v2[idx2]);
            idx2++;
        }
    }
    while(idx1 < v1.size())
    {
        v3.push_back(v1[idx1]);
        idx1++;
    }
    while(idx2 < v2.size())
    {
        v3.push_back(v2[idx2]);
        idx2++;
    }
}

void build(int node, int l, int r)
{
    if(l == r)
    {
        tree[node].push_back(arr[l]);
        return;
    }
    int mid = (l + r) >> 1;
    build(node << 1, l, mid);
    build((node << 1) + 1, mid + 1, r);
    mer(tree[(node << 1)], tree[(node << 1) + 1], tree[node]);
}

vector<int> get_range(int node, int l, int r, int st, int en)
{
    if(st > r || en < l)
        return vector<int>();
    if(st <= l && r <= en)
    {
        return tree[node];
    }
    int mid = (l + r) >> 1;
    vector<int> ret1 = get_range((node << 1), l, mid, st, en);
    vector<int> ret2 = get_range((node << 1) + 1, mid + 1, r, st, en);
    vector<int> ret;
    mer(ret1, ret2, ret);
    return ret;
}

int mark[N];

int main ()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int m, k, n, s;
    cin >> m >> k >> n >> s;
    for(int i = 1; i <= m; i++)
        cin >> arr[i];
    for(int i = 0; i < s; i++)
        cin >> arr2[i];
    sort(arr2, arr2 + s);
    build(1, 1, m);
    int rem = m - n * k;
    int sol = INT_MAX;
    vector<int> out;
    for(int i = 1; i <= n; i++)
    {
        int st_pos = k * (i - 1) + 1;
        int st = st_pos + k - 1, en = min(m, st_pos + k - 1 + rem), ans = -1;
        while(st <= en)
        {
            int mid = (st + en) >> 1;
            vector<int> vec = get_range(1, 1, m, st_pos, mid);
            int idx1 = 0, idx2 = 0;
            while(idx1 < vec.size() && idx2 < s)
            {
                if(vec[idx1] == arr2[idx2])
                    idx2++;
                idx1++;
            }
            if(idx2 == s)
            {
                ans = mid;
                en = mid - 1;
            }
            else
            {
                st = mid + 1;
            }
        }
        if(ans == -1)
            continue;
        int len = (ans - st_pos + 1);
        int cur = len - k;
        if(cur < sol)
        {
            sol = len - k;
            vector<int> vec = get_range(1, 1, m, st_pos, ans);
            int idx1 = 0, idx2 = 0;
            while(idx1 < vec.size())
            {
                if(idx2 < s && vec[idx1] == arr2[idx2])
                    idx2++;
                else
                    mark[vec[idx1]]++;
                idx1++;
            }
            out.clear();

            for(int j = st_pos; j <= ans; j++)
            {
                if(mark[arr[j]] == 0)
                    continue;
                if(cur){
                    out.push_back(j);
                    cur--;
                }
                mark[arr[j]]--;
            }
            int idx = k * (n) + 1 + len - k;
            for(int j = idx; j <= m; j++)
                out.push_back(j);
        }
    }
    if(sol == INT_MAX)
        cout << -1;
    else
    {
        cout << out.size() << '\n';
        for(auto &element: out)
            cout << element << ' ';
    }
    return 0;
}


    #include<bits/stdc++.h>

    using namespace std;

    typedef long long ll;
    typedef long double ld;

    const int N = 5e5 + 5;
    int out[N];
    int arr[N], arr2[N];
    int p;
    int freq1[N];
    int freq2[N];
    int temp[N];

    int main ()
    {
        ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
        int m, k, n, s;
        cin >> m >> k >> n >> s;
        for(int i = 1; i <= m; i++)
            cin >> arr[i];
        for(int i = 0; i < s; i++)
            cin >> arr2[i];
        sort(arr2, arr2 + s);
        for(int i = 0; i < s; i++)
            freq2[arr2[i]]++;
        int same = 0;
        for(int i = 0; i < N; i++)
            if(freq2[i] == 0)
                same++;
        int rem = m - n * k;
        int sol = INT_MAX;
        int idx = 1;
        for(int i = 1; i <= n; i++)
        {
            int st_pos = k * (i - 1) + 1;
            if(i != 1)
            {
                int pre = k * (i - 2) + 1;
                for(int i = pre;  i < st_pos; i++)
                {
                    freq1[arr[i]]--;
                    if(freq1[arr[i]] + 1 == freq2[arr[i]])
                        same--;
                }
            }
            while(same < N && idx <= m)
            {
                freq1[arr[idx]]++;
                if(freq1[arr[idx]] == freq2[arr[idx]])
                    same++;
                idx++;
            }
            if(same != N)
                break;
            int len = (idx - st_pos);
            int o = len - k;
            if(o < sol && o <= rem){
                sol = o;
                for(int i = st_pos; i < idx; i++)
                {
                    temp[arr[i]] = freq1[arr[i]] - freq2[arr[i]];
                }
                int cur = o;
                p = 0;
                for(int i = st_pos; i < idx; i++)
                {
                    if(temp[arr[i]])
                    {
                        if(cur)
                        {
                            out[p++] = i;
                            cur--;
                        }
                        temp[arr[i]]--;
                    }
                }
                int en = k * n + 1 + o;
                for(int i = en; i <= m; i++)
                    out[p++] = i;
            }
        }
        if(sol == INT_MAX)
            cout << -1;
        else
        {
            cout << p << '\n';
            for(int i = 0; i < p; i++)
                cout << out[i] << ' ';
        }
        return 0;
    }


#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const int N = 5e5 + 5;
vector<int> tree[N];
int arr[N];
int arr2[N];

void mer(vector<int> &v1, vector<int> &v2, vector<int> &v3)
{
    int idx1 = 0, idx2 = 0;
    while(idx1 < v1.size() && idx2 < v2.size())
    {
        if(v1[idx1] <= v2[idx2])
        {
            v3.push_back(v1[idx1]);
            idx1++;
        }
        else
        {
            v3.push_back(v2[idx2]);
            idx2++;
        }
    }
    while(idx1 < v1.size())
    {
        v3.push_back(v1[idx1]);
        idx1++;
    }
    while(idx2 < v2.size())
    {
        v3.push_back(v2[idx2]);
        idx2++;
    }
}

void build(int node, int l, int r)
{
    if(l == r)
    {
        tree[node].push_back(arr[l]);
        return;
    }
    int mid = (l + r) >> 1;
    build(node << 1, l, mid);
    build((node << 1) + 1, mid + 1, r);
    mer(tree[(node << 1)], tree[(node << 1) + 1], tree[node]);
}

vector<int> get_range(int node, int l, int r, int st, int en)
{
    if(st > r || en < l)
        return vector<int>();
    if(st <= l && r <= en)
    {
        return tree[node];
    }
    int mid = (l + r) >> 1;
    vector<int> ret1 = get_range((node << 1), l, mid, st, en);
    vector<int> ret2 = get_range((node << 1) + 1, mid + 1, r, st, en);
    vector<int> ret;
    mer(ret1, ret2, ret);
    return ret;
}

int main ()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int m, k, n, s;
    cin >> m >> k >> n >> s;
    for(int i = 1; i <= m; i++)
        cin >> arr[i];
    for(int i = 0; i < s; i++)
        cin >> arr2[i];
    sort(arr2, arr2 + s);
    build(1, 1, m);
    int rem = m - n * k;
    int sol = INT_MAX;
    vector<int> out;
    for(int i = 1; i <= n; i++)
    {
        int st_pos = k * (i - 1) + 1;
        int st = st_pos + k - 1, en = min(m, st_pos + k - 1 + rem), ans = -1;
        while(st <= en)
        {
            int mid = (st + en) >> 1;
            vector<int> vec = get_range(1, 1, m, st_pos, mid);
            int idx1 = 0, idx2 = 0;
            while(idx1 < vec.size() && idx2 < s)
            {
                if(vec[idx1] == arr2[idx2])
                    idx2++;
                idx1++;
            }
            if(idx2 == s)
            {
                ans = mid;
                en = mid - 1;
            }
            else
            {
                st = mid + 1;
            }
        }
        if(ans == -1)
            continue;
        int len = (ans - st_pos + 1);
        int cur = len - k;
        if(cur < sol)
        {
            sol = len - k;
            map<int, int> mark;
            vector<int> vec = get_range(1, 1, m, st_pos, ans);
            int idx1 = 0, idx2 = 0;
            while(idx1 < vec.size())
            {
                if(idx2 < s && vec[idx1] == arr2[idx2])
                    idx2++;
                else
                    mark[vec[idx1]]++;
                idx1++;
            }
            out.clear();

            for(int j = st_pos; j <= ans && cur; j++)
            {
                if(mark.find(arr[j]) == mark.end())
                    continue;
                out.push_back(j);
                mark[arr[j]]--;
                if(mark[arr[j]] == 0)
                    mark.erase(mark.find(arr[j]));
                cur--;
            }
            int idx = k * (n) + 1 + len - k;
            for(int j = idx; j <= m; j++)
                out.push_back(j);
        }
    }
    if(sol == INT_MAX)
        cout << -1;
    else
    {
        cout << out.size() << '\n';
        for(auto &element: out)
            cout << element << ' ';
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long double ld;
#define int long long
#define PB push_back
#define all(x) (x).begin(),(x).end()
#define ii pair <int,int>
#define mii map <int,int>
#define vi vector<int>
#define vii vector< ii >
#define F first
#define S second
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define rep1(i,a,b) for(int i=a;i<=b;i++)
#define repd(i,a,b) for(int i=a;i>=b;--i)
#define sz(x) (int)((x).size())
const long double PI=3.141592653589793238462643383279502884197169399375105820974944;

const int mod = 1e9 + 7;
const int inf = 1e18;
const int maxn = 1e5+5;

void solve(){
	int m, k, n, s; cin>>m>>k>>n>>s;
	int a[m], b[s];
	rep(i, 0, m) cin>>a[i];
	rep(i, 0, s) cin>>b[i];
	map<int ,int> mp;
	rep(i, 0, s) mp[b[i]]++;
	int cnt = 0;
	map <int, int> h;

	vector <pair<int, int>> v;
	int lb=-1, rb =-1;

	while(true){
		if(lb != -1 && mp[a[lb]]){
			if(mp[a[lb]] >= h[a[lb]]) --cnt;
			--h[a[lb]];
		}lb++;
		while((cnt < s || (rb-lb+1 < k)) && rb < m-1){
			++rb;
			if(mp[a[rb]]){
				if(mp[a[rb]] > h[a[rb]]) cnt++;
				h[a[rb]]++;
			}
		}
		if(rb-lb+1 < k) break;
		if(cnt == s) v.PB({lb, rb});
		else break;
	}

   /*for(int i=1; i+k-1 < m; i++){
		if(mp[a[i-1]]){
			if(mp[a[i-1]] >= h[a[i-1]]) --cnt;
			--h[a[i-1]];
		}
		if(mp[a[i+k-1]]){
			if(mp[a[i+k-1]] > h[a[i+k-1]]) cnt++;
			h[a[i+k-1]]++;
		}
		if(cnt == s) v.PB({i, k-1+i});
		cout<<cnt<<" ";
	}*/
//	cout<<"\n";
	//for(auto i : v) cout<<i.F<<" "<<i.S<<"\n";
	for(auto i : v){
		int l = i.F, r = i.S;
		if(l/k + (m-r-1)/k >= n-1){
		//	cout<<l<<" "<<r<<" ";
			cout<<m-n*k<<"\n";

			int x = min(l/k, n-1);
			int y = min((m-r-1)/k, n-1-x);
		//	cout<<x<<" "<<y<<"\n";
			x = l-k*x;
			rep1(j, 1, x) cout<<j<<" ";
			y = r+y*k+1;
			rep1(j, y+1, m) cout<<j<<" ";

			x = r-l+1-k;
			map <int, int> t;
			rep1(j, l, r){
				if(!x) break;
				if(t[a[j]] == mp[a[j]]){
					--x;cout<<j+1<<" ";
				}else if(mp[a[j]]) t[a[j]]++;
			}
			return;
		}
	}
	cout<<-1;
}

signed main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int tc=1; //cin>>tc;
    while(tc--){
        solve(); cout<<'\n';
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long double ld;
#define int long long
#define PB push_back
#define all(x) (x).begin(),(x).end()
#define ii pair <int,int>
#define mii map <int,int>
#define vi vector<int>
#define vii vector< ii >
#define F first
#define S second
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define rep1(i,a,b) for(int i=a;i<=b;i++)
#define repd(i,a,b) for(int i=a;i>=b;--i)
#define sz(x) (int)((x).size())
const long double PI=3.141592653589793238462643383279502884197169399375105820974944;

const int mod = 1e9 + 7;
const int inf = 1e18;
const int maxn = 1e5+5;

void solve(){
	int m, k, n, s; cin>>m>>k>>n>>s;
	int a[m], b[s];
	rep(i, 0, m) cin>>a[i];
	rep(i, 0, s) cin>>b[i];
	map<int ,int> mp;
	rep(i, 0, s) mp[b[i]]++;
	int cnt = 0;
	map <int, int> h;

	vector <pair<int, int>> v;
	int lb=-1, rb =-1;

	while(true){
		if(lb != -1 && mp[a[lb]]){
			if(mp[a[lb]] >= h[a[lb]]) --cnt;
			--h[a[lb]];
		}lb++;
		while((cnt < s || (rb-lb+1 < k)) && rb < m-1){
			++rb;
			if(mp[a[rb]]){
				if(mp[a[rb]] > h[a[rb]]) cnt++;
				h[a[rb]]++;
			}
		}
		if(rb-lb+1 < k) break;
		if(cnt == s) v.PB({lb, rb});
		else break;
	}

	for(auto i : v){
		int l = i.F, r = i.S;
		if(l/k + (m-r-1)/k >= n-1){
			cout<<m-n*k<<"\n";

			int x = min(l/k, n-1);
			int y = min((m-r-1)/k, n-1-x);
			x = l-k*x;
			rep1(j, 1, x) cout<<j<<" ";
			y = r+y*k+1;
			rep1(j, y+1, m) cout<<j<<" ";

			x = r-l+1-k;
			map <int, int> t;
			rep1(j, l, r){
				if(!x) break;
				if(t[a[j]] == mp[a[j]]){
					--x;cout<<j+1<<" ";
				}else if(mp[a[j]]) t[a[j]]++;
			}
			return;
		}
	}
	cout<<-1;
}

signed main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int tc=1; //cin>>tc;
    while(tc--){
        solve(); cout<<'\n';
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long double ld;
#define int long long
#define PB push_back
#define all(x) (x).begin(),(x).end()
#define ii pair <int,int>
#define mii map <int,int>
#define vi vector<int>
#define vii vector< ii >
#define F first
#define S second
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define rep1(i,a,b) for(int i=a;i<=b;i++)
#define repd(i,a,b) for(int i=a;i>=b;--i)
#define sz(x) (int)((x).size())
const long double PI=3.141592653589793238462643383279502884197169399375105820974944;

const int mod = 1e9 + 7;
const int inf = 1e18;
const int maxn = 1e5+5;

void solve(){
	int m, k, n, s; cin>>m>>k>>n>>s;
	int a[n], b[s];
	rep(i, 0, m) cin>>a[i];
	rep(i, 0, s) cin>>b[i];
	map<int ,int> mp;
	rep(i, 0, s) mp[b[i]]++;
	int cnt = 0;
	map <int, int> h;

	vector <pair<int, int>> v;
	int lb=-1, rb =-1;

	while(true){
		if(lb != -1 && mp[a[lb]]){
			if(mp[a[lb]] >= h[a[lb]]) --cnt;
			--h[a[lb]];
		}lb++;
		while((cnt < s || (rb-lb+1 < k)) && rb < m-1){
			++rb;
			if(mp[a[rb]]){
				if(mp[a[rb]] > h[a[rb]]) cnt++;
				h[a[rb]]++;
			}
		}
		if(rb-lb+1 < k) break;
		if(cnt == s) v.PB({lb, rb});
		else break;
	}

   /*for(int i=1; i+k-1 < m; i++){
		if(mp[a[i-1]]){
			if(mp[a[i-1]] >= h[a[i-1]]) --cnt;
			--h[a[i-1]];
		}
		if(mp[a[i+k-1]]){
			if(mp[a[i+k-1]] > h[a[i+k-1]]) cnt++;
			h[a[i+k-1]]++;
		}
		if(cnt == s) v.PB({i, k-1+i});
		cout<<cnt<<" ";
	}*/
//	cout<<"\n";
	//for(auto i : v) cout<<i.F<<" "<<i.S<<"\n";
	for(auto i : v){
		int l = i.F, r = i.S;
		if(l/k + (m-r-1)/k >= n-1){
		//	cout<<l<<" "<<r<<" ";
			cout<<m-n*k<<"\n";

			int x = min(l/k, n-1);
			int y = min((m-r-1)/k, n-1-x);
		//	cout<<x<<" "<<y<<"\n";
			x = l-k*x;
			rep1(j, 1, x) cout<<j<<" ";
			y = r+y*k+1;
			rep1(j, y+1, m) cout<<j<<" ";

			x = r-l+1-k;
			map <int, int> t;
			rep1(j, l, r){
				if(!x) break;
				if(t[a[j]] == mp[a[j]]){
					--x;cout<<j+1<<" ";
				}else if(mp[a[j]]) t[a[j]]++;
			}
			return;
		}
	}
	cout<<-1;
}

signed main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int tc=1; //cin>>tc;
    while(tc--){
        solve(); cout<<'\n';
    }
    return 0;
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  if (m==500000 && k==400)
    printf("i -> %d, j -> %d\n", ans.ss.ff, ans.ss.ss);
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or forig[a[i]] <= 0) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = (ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if (ss.find(a[i])==ss.end() && cnt_)
      ret.pb(i), cnt_--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur){
      dbg(i, j);
      ans = min(ans, pair<int, pii>((i-1)%k + (j-i+1-k), {i, j}));
    }
    if (ss.find(a[i])!=ss.end()){
      dbg(i, a[i], freq[a[i]]);
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = (ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if (ss.find(a[i])==ss.end() && cnt_)
      ret.pb(i), cnt_--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur){
      if (m==100 && k==15 && j < i)
        printf("i -> %d, j -> %d, cur -> %d\n", i, j, cur);
      ans = min(ans, pair<int, pii>((i-1)%k + (j-i+1-k), {i, j}));
    }
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  set <int> aux;
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if (!forig[a[i]] && ss.find(a[i])!=s.end())
      aux.insert(a[i]);
    if ((ss.find(a[i])==ss.end() or !forig[a[i]]) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--;
  }
  assert(ss==aux);
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, n, k, s, cur = 0, a[N], b[N], f[N], mark[N];

void solve(int l, int r){
  vector <int> ans;
  int pfx = l%k, inter = r-l+1-k;
  for(int i = 0; i < pfx; i++)
    ans.pb(i+1);
  for(int i = l; i <= r; i++){
    if (inter && (!mark[a[i]] or f[a[i]] < 0))
      ans.pb(i+1), inter--, f[a[i]]++;
  }
  printf("%d\n", (int) ans.size());
  for(auto &x : ans) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 0; i < m; i++)
    scanf("%d", &a[i]);
  for(int i = 0; i < s; i++){
    scanf("%d", &b[i]), f[b[i]]++;
    if (f[b[i]]==1) cur++;
    mark[b[i]] = 1;
  }
  for(int i = 0, j = -1; i < m; i++){
    while(j < m-1 && (cur or j-i+1<k)){
      if (!(--f[a[++j]]) && mark[a[j]])
        cur--;
    }
    if (!cur && (i%k + j-i+1-k) <= m - n*k)
      return solve(i, j), 0;
    if (mark[a[i]]){
      if (!f[a[i]]) cur++;
      f[a[i]]++;
    }
  }
  printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  set <int> aux;
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if (!forig[a[i]] && ss.find(a[i])!=ss.end())
      aux.insert(a[i]);
    if ((ss.find(a[i])==ss.end() or !forig[a[i]]) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--;
  }
  assert(ss==aux);
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or !forig[a[i]]) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(j < m && (cur or j-i+1<k)){
      freq[a[++j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur && j-i+1>=k)
      ans = min(ans, pair<int, pii>((i-1)%k + j-i+1-k, {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, n, k, s, cur = 0, a[N], b[N], f[N], mark[N];

void solve(int l, int r){
  vector <int> ans;
  int pfx = l%k, inter = r-l+1-k;
  for(int i = 0; i < pfx; i++)
    ans.pb(i+1);
  for(int i = l; i <= r; i++){
    if (inter && (!mark[a[i]] or f[a[i]] < 0))
      ans.pb(i+1), inter--, f[a[i]]++;
  }
  printf("%d\n", (int) ans.size());
  for(auto &x : ans) printf("%d ", x);
}

int main(){
  scanf("%d%d%d%d", &m, &n, &k, &s);
  for(int i = 0; i < m; i++)
    scanf("%d", &a[i]);
  memset(f, -1, sizeof f);
  for(int i = 0; i < s; i++){
    scanf("%d", &b[i]);
    f[b[i]] = (f[b[i]]==-1 ? 1 : f[b[i]]+1);
    if (f[b[i]]==1) cur++;
    mark[b[i]] = 1;
  }
  for(int i = 0, j = -1; i < m; i++){
    while(j < m-1 && (cur or j-i+1<k)){
      f[a[++j]]--;
      if (!f[a[j]]) cur--;
    }
    if (!cur && (i%k + j-i+1-k) <= m - n*k)
      return solve(i, j), 0;
    if (!f[a[i]]) cur++;
    if (mark[a[i]]) f[a[i]]++;
  }
  printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = max(0, (ans.ss.ss-ans.ss.ff+1-k));
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if (ss.find(a[i])==ss.end() && cnt_)
      ret.pb(i), cnt_--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = ans.ss.ss-ans.ss.ff+1-k;
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or !forig[a[i]]) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[b[i]] = freq[b[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(j < m && (cur or j-i+1<k)){
      freq[a[++j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur && j-i+1>=k)
      ans = min(ans, pair<int, pii>((i-1)%k + j-i+1-k, {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or forig[a[i]] <= 0) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--;
  }
  assert(cnt_==0);
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  assert(cnt_+cnt==ans.ff);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or !forig[a[i]]) && cnt_)
      ret.pb(i), cnt_--;
    forig[a[i]]--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  set <int> aux;
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or !forig[a[i]]) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--, aux.insert(a[i]);
  }
  bool ok = 1;
  for(auto &x : ss)
    if (aux.find(x)==aux.end()) ok = 0;
  assert(ok==1);
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = (ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if (ss.find(a[i])==ss.end() && cnt_)
      ret.pb(i), cnt_--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur){
      if (m==100 && k==15)
        printf("i -> %d, j -> %d, cur -> %d\n", i, j, cur);
      ans = min(ans, pair<int, pii>((i-1)%k + (j-i+1-k), {i, j}));
    }
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = (ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if (ss.find(a[i])==ss.end() && cnt_)
      ret.pb(i), cnt_--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur){
      if (m==100 && k==15 && (j-i+1-k) < 0)
        printf("i -> %d, j -> %d, cur -> %d\n", i, j, cur);
      ans = min(ans, pair<int, pii>((i-1)%k + (j-i+1-k), {i, j}));
    }
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or !forig[a[i]]) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur or j < min(m, i+k-1)){
      freq[a[++j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + j-i+1-k, {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, n, k, s, cur = 0, a[N], b[N], f[N], mark[N];

void solve(int l, int r){
  vector <int> ans;
  int pfx = l%k, inter = r-l+1-k;
  for(int i = 0; i < pfx; i++)
    ans.pb(i+1);
  for(int i = l; i <= r; i++){
    if (inter && (!mark[a[i]] or f[a[i]] < 0))
      ans.pb(i+1), inter--, f[a[i]]++;
  }
  printf("%d\n", (int) ans.size());
  for(auto &x : ans) printf("%d ", x);
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 0; i < m; i++)
    scanf("%d", &a[i]);
  memset(f, -1, sizeof f);
  for(int i = 0; i < s; i++){
    scanf("%d", &b[i]);
    f[b[i]] = (f[b[i]]==-1 ? 1 : f[b[i]]+1);
    if (f[b[i]]==1) cur++;
    mark[b[i]] = 1;
  }
  for(int i = 0, j = -1; i < m; i++){
    while(j < m-1 && (cur or j-i+1<k)){
      f[a[++j]]--;
      if (!f[a[j]]) cur--;
    }
    if (!cur && (i%k + j-i+1-k) <= m - n*k)
      return solve(i, j), 0;
    if (!f[a[i]]) cur++;
    if (mark[a[i]]) f[a[i]]++;
  }
  printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  set <int> aux;
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or !forig[a[i]]) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--, aux.insert(a[i]);
  }
  assert(ss==aux);
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if (ss.find(a[i])==ss.end() && cnt_)
      ret.pb(i), cnt_--;
  }
  printf("%d\n", (int) ret.size());
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = (ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if (ss.find(a[i])==ss.end() && cnt_)
      ret.pb(i), cnt_--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  assert(cnt_+cnt==ans.ff);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or !forig[a[i]]) && cnt_)
      ret.pb(i), cnt_--;
    forig[a[i]]--;
  }
  assert(cnt_==0);
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or !forig[a[i]]) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while((cur && j < m) or (j-i+1) < k){
      freq[a[++j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + j-i+1-k, {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, k, n, s, a[N], b[N], freq[N], forig[N];
pair <int, pii> ans;
set <int> ss;

void print(){
  vector <int> ret;
  int cnt = (ans.ss.ff-1)%k;
  for(int i = 1; i <= cnt; i++)
    ret.pb(i);
  if (n==500000 && k==400)
    printf("i -> %d, j -> %d\n", ans.ss.ff, ans.ss.ss);
  int cnt_ = max(0, ans.ss.ss-ans.ss.ff+1-k);
  for(int i = ans.ss.ff; i <= ans.ss.ss; i++){
    if ((ss.find(a[i])==ss.end() or forig[a[i]] <= 0) && cnt_)
      ret.pb(i), cnt_--;
    else
      forig[a[i]]--;
  }
  printf("%d\n", ans.ff);
  for(auto &x : ret) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 1; i <= m; i++)
    scanf("%d", &a[i]);
  for(int i = 1; i <= s; i++){
    scanf("%d", &b[i]);
    freq[b[i]]++, ss.insert(b[i]);
  }
  for(int i = 1; i <= s; i++)
    forig[a[i]] = freq[a[i]];
  ans = pair<int, pii>(INF, {INF, INF});
  int cur = (int) ss.size();
  for(int i = 1, j = 0; i <= m; i++){
    while(cur && j < m){
      j++;
      freq[a[j]]--;
      if (!freq[a[j]] && ss.find(a[j])!=ss.end())
        cur--;
    }
    if (!cur)
      ans = min(ans, pair<int, pii>((i-1)%k + max(0, (j-i+1-k)), {i, j}));
    if (ss.find(a[i])!=ss.end()){
      if (!freq[a[i]]) cur++;
      freq[a[i]]++;
    }
  }
  if (ans.ff <= m - k*n) print();
  else printf("-1\n");
}


#include <bits/stdc++.h>

#ifdef NJUDGE
  #include "kowski.h"
#else
  #define dbg(...)
#endif

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const ll LINF = 0x3f3f3f3f3f3f3f3f;
const ll NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;

#define pb push_back
#define ss second
#define ff first

const int N = 5e5+10;
int m, n, k, s, cur = 0, a[N], b[N], f[N], mark[N];

void solve(int l, int r){
  vector <int> ans;
  int pfx = l%k, inter = r-l+1-k;
  for(int i = 0; i < pfx; i++)
    ans.pb(i+1);
  for(int i = l; i <= r; i++){
    if (inter && (!mark[a[i]] or f[a[i]] < 0))
      ans.pb(i+1), inter--, f[a[i]]++;
  }
  printf("%d\n", (int) ans.size());
  for(auto &x : ans) printf("%d ", x);
  printf("\n");
}

int main(){
  scanf("%d%d%d%d", &m, &k, &n, &s);
  for(int i = 0; i < m; i++)
    scanf("%d", &a[i]);
  for(int i = 0; i < s; i++){
    scanf("%d", &b[i]), f[b[i]]++;
    if (f[b[i]]==1) cur++;
    mark[b[i]] = 1;
  }
  for(int i = 0, j = -1; i < m; i++){
    while(j < m-1 && (cur or j-i+1<k)){
      if (!(--f[a[++j]]) && mark[a[j]])
        cur--;
    }
    if (!cur && (i%k + j-i+1-k) <= m - n*k){
      return solve(i, j), 0;
    if (mark[a[i]]){
      if (!f[a[i]]) cur++;
      f[a[i]]++;
    }
  }
  printf("-1\n");
}


#include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;

typedef long long int ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> plii;
typedef pair<int, pii> piii;
const int INF = 1e9+10;
const ll LINF = 1LL*INF*INF;
const int MAXN = 5e5+10;
const int MAXM = 3e3+10;

priority_queue<int> pq;
vector<vector<int> > graph;

int A[MAXN];
int chk[MAXN];
int anschk[MAXN];
vector<int> B;
vector<pii> C;
char S[MAXN];

int main()
{
    int n,m,k,a,b,x,y,s;
    int sum = 0;
    int cnt = 0;

    scanf("%d%d%d%d",&m,&k,&n,&s);

    for(int i=1;i<=m;i++)
    {
        scanf("%d",&A[i]);
    }

    for(int i=1;i<=s;i++){
        scanf("%d",&x);
        B.push_back(x);
    }

    sort(B.begin(),B.end());

    C.push_back(pii(B[0],1));

    for(int i=1;i<B.size();i++){
        if(B[i]!=B[i-1])C.push_back(pii(B[i],1));
        else C.back().second++;
    }

    int L = 1;
    int R = 1;
    int cur = 0;
    int anscnt = 0;

    s = C.size();

    while(R<=m){
        //printf("%d %d ",L,R);
        //printf("%d\n",cnt);
        if(cnt==s){
            if(R-L+1-k+(L-1)%k<=0){
                printf("0");
                return 0;
            }
            if(R-L+1-k+(L-1)%k<=m-n*k){
                printf("%d\n",R-L+1-k+(L-1)%k);
                for(int i=1;i<=(L-1)%k;i++)
                    printf("%d ",A[i]);
                for(int i=L;i<=R;i++){
                    cur = lower_bound(C.begin(),C.end(),pii(A[i],0))-C.begin();
                    if(cur==C.size()||C[cur].first!=A[i])printf("%d ",i),anscnt++;
                    else if(anschk[cur]<C[cur].second)anschk[cur]++;
                    else printf("%d ",i),anscnt++;
                    if(anscnt==R-L+1-k)break;
                }

                return 0;
            }
            cur = lower_bound(C.begin(),C.end(),pii(A[L],0))-C.begin();
            if(cur!=C.size()&&C[cur].first==A[L])chk[cur]--;
            if(chk[cur]==C[cur].second-1)cnt--;
            L++;
            if(cnt<s)R++;
        }
        else {
            cur = lower_bound(C.begin(),C.end(),pii(A[R],0))-C.begin();

            if(cur==C.size()||C[cur].first!=A[R]){R++;continue;}
            chk[cur]++;
            if(chk[cur]==C[cur].second)cnt++;
            if(cnt<s)R++;
        }
    }

    printf("-1");

    return 0;
}


#include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;

typedef long long int ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> plii;
typedef pair<int, pii> piii;
const int INF = 1e9+10;
const ll LINF = 1LL*INF*INF;
const int MAXN = 5e5+10;
const int MAXM = 3e3+10;

priority_queue<int> pq;
vector<vector<int> > graph;

int A[MAXN];
int chk[MAXN];
int anschk[MAXN];
vector<int> B;
vector<pii> C;
char S[MAXN];

int main()
{
    int n,m,k,a,b,x,y,s;
    int sum = 0;
    int cnt = 0;

    scanf("%d%d%d%d",&m,&k,&n,&s);

    for(int i=1;i<=m;i++)
    {
        scanf("%d",&A[i]);
    }

    for(int i=1;i<=s;i++){
        scanf("%d",&x);
        B.push_back(x);
    }

    sort(B.begin(),B.end());

    C.push_back(pii(B[0],1));

    for(int i=1;i<B.size();i++){
        if(B[i]!=B[i-1])C.push_back(pii(B[i],1));
        else C.back().second++;
    }

    int L = 1;
    int R = 1;
    int cur = 0;
    int anscnt = 0;

    s = C.size();

    while(R<=m){
        //printf("%d %d ",L,R);
        //printf("%d\n",cnt);
        if(cnt==s){

            if(R-L+1-k+(L-1)%k<=m-n*k){
                printf("%d\n",R-L+1-k+(L-1)%k);
                for(int i=1;i<=(L-1)%k;i++)
                    printf("%d ",A[i]);
                for(int i=L;i<=R;i++){
                    cur = lower_bound(C.begin(),C.end(),pii(A[i],0))-C.begin();
                    if(cur==C.size()||C[cur].first!=A[i])printf("%d ",i),anscnt++;
                    else if(anschk[cur]<C[cur].second)anschk[cur]++;
                    else printf("%d ",i),anscnt++;
                    if(anscnt==R-L+1-k)break;
                }

                return 0;
            }
            cur = lower_bound(C.begin(),C.end(),pii(A[L],0))-C.begin();
            if(cur!=C.size()&&C[cur].first==A[L])chk[cur]--;
            if(chk[cur]==C[cur].second-1)cnt--;
            L++;
            if(cnt<s)R++;
        }
        else {
            cur = lower_bound(C.begin(),C.end(),pii(A[R],0))-C.begin();

            if(cur==C.size()||C[cur].first!=A[R]){R++;continue;}
            chk[cur]++;
            if(chk[cur]==C[cur].second)cnt++;
            if(cnt<s)R++;
        }
    }

    printf("-1");

    return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <iostream>
#include <ctime>
#include <bitset>
#define gc getchar()
#define ll long long
#define il inline
#define fi first
#define se second
#define mk make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define repn(i, b, a) for (int i = b; i >= a; --i)
#define ite iterator

using namespace std;

const int N = 5e5 + 5, mod = 998244353;

template<class o> il void qr(o &x) {
    x = 0; char c = gc; int f = 1;
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = gc;}
    while (c >= '0' && c <= '9') {x = x * 10 + (c ^ 48); c = gc;}
    x *= f;
}

template<class o> void qw(o x) {
    if(x / 10) qw(x / 10); putchar(x % 10 + 48);
}

template<class o> void pr1(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); putchar(' ');
}

template<class o> void pr2(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); puts("");
}

il int ksm(int a, int b = mod - 2) {
    int ans = 1;
    for (; b; b >>= 1, a = 1ll * a * a % mod)
        if (b & 1) ans = 1ll * ans * a % mod;
    return ans;
}

il int add(int a, int b) {return a += b, a >= mod ? a - mod : a;}
il int sub(int a, int b) {return a -= b, a < 0 ? a + mod : a;}

/* code */

vector<int> p[N];
pii q[N]; int a[N], b[N], siz[N];
bool vis[N], v[N]; int ans[N];

bool cmp(pii a, pii b) {
    return a.fi > b.fi;
}

void solve() {
    int m, n, k, s; qr(m), qr(k), qr(n), qr(s);
    rep (i, 1, m) qr(a[i]), p[a[i]].pb(i); int cnt = 0;
    rep (i, 1, s) {
        int x; qr(x);
        if (vis[x]) ++siz[x];
        else vis[x] = 1, b[++cnt] = x, siz[x] = 1;
    } int tmp = 0, r, l = 0x3f3f3f3f;
    rep (i, 1, cnt) {
        int x = b[i];
        if (siz[x] > p[x].size()) {puts("-1"); return ;}
        int sz = p[x].size();
        rep (j, 0, sz - 1) q[++tmp] = mk(p[x][j], j);
        l = min(l, p[x][sz - siz[x]]);
    } sort(q + 1, q + tmp + 1, cmp);
    int mn = 0x3f3f3f3f, L = 0, R = 0;
    rep (i, 1, tmp) {
        r = q[i].fi; int j = q[i].se, x = a[q[i].fi];
        int sum = min(r - l + 1, k);
        int d = r - l + 1 - sum;
        d += (l - 1 + k) % k;
        if (mn > d) mn = d, L = l, R = r;
        if (j - siz[x] < 0) break;
        l = min(l, p[x][j - siz[x]]);
    }
    if (m - mn < n * k) {puts("-1"); return ;}
    rep (i, L, R) {
        int x = a[i];
        if (vis[x]) {
            if (siz[x]) v[i] = 1, --siz[x];
        }
    } int c = min(R - L + 1, k) - s; int len = 0;
    rep (i, L, R) {
        int x = a[i];
        if (!v[i]) {
            if (c) --c;
            else ans[++len] = i;
        }
    }
    int pos = L - (L - 1 + k) % k + 1;
    if (k == 1) pos = max(1, L - 1);
    rep (i, pos, L - 1) ans[++len] = i;
    if (pos - 1 >= (n - 1) * k) {
        int cost = (pos - 1) - (n - 1) * k;
        rep (i, 1, cost) ans[++len] = i;
    }
    pr2(len); sort(ans + 1, ans + len + 1);
    rep (i, 1, len) pr1(ans[i]);
}

int main() {
    //int T; qr(T); while (T--) {
        solve();
    //}
    return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <iostream>
#include <ctime>
#include <bitset>
#define gc getchar()
#define ll long long
#define il inline
#define fi first
#define se second
#define mk make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define repn(i, b, a) for (int i = b; i >= a; --i)
#define ite iterator

using namespace std;

const int N = 5e5 + 5, mod = 998244353;

template<class o> il void qr(o &x) {
    x = 0; char c = gc; int f = 1;
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = gc;}
    while (c >= '0' && c <= '9') {x = x * 10 + (c ^ 48); c = gc;}
    x *= f;
}

template<class o> void qw(o x) {
    if(x / 10) qw(x / 10); putchar(x % 10 + 48);
}

template<class o> void pr1(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); putchar(' ');
}

template<class o> void pr2(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); puts("");
}

il int ksm(int a, int b = mod - 2) {
    int ans = 1;
    for (; b; b >>= 1, a = 1ll * a * a % mod)
        if (b & 1) ans = 1ll * ans * a % mod;
    return ans;
}

il int add(int a, int b) {return a += b, a >= mod ? a - mod : a;}
il int sub(int a, int b) {return a -= b, a < 0 ? a + mod : a;}

/* code */

vector<int> p[N];
pii q[N]; int a[N], b[N], siz[N];
bool vis[N], v[N]; int ans[N];

bool cmp(pii a, pii b) {
    return a.fi > b.fi;
}

void solve() {
    int m, n, k, s; qr(m), qr(k), qr(n), qr(s);
    rep (i, 1, m) qr(a[i]), p[a[i]].pb(i); int cnt = 0;
    rep (i, 1, s) {
        int x; qr(x);
        if (vis[x]) ++siz[x];
        else vis[x] = 1, b[++cnt] = x, siz[x] = 1;
    } int tmp = 0, r, l = 0x3f3f3f3f;
    rep (i, 1, cnt) {
        int x = b[i];
        if (siz[x] > p[x].size()) {puts("-1"); return ;}
        int sz = p[x].size();
        rep (j, 0, sz - 1) q[++tmp] = mk(p[x][j], j);
        l = min(l, p[x][sz - siz[x]]);
    } sort(q + 1, q + tmp + 1, cmp);
    int mn = 0x3f3f3f3f, L = 0, R = 0;
    rep (i, 1, tmp) {
        r = q[i].fi; int j = q[i].se, x = a[q[i].fi];
        int t = (r - 1) / k;
        if (t * k + 1 >= l && (t + 1) * k <= r) {puts("0"); return ;}
        int sum = min(r - l + 1 + (l - 1 + k) % k, k);
        int d = r - l + 1 + (l - 1 + k) % k - sum;
        if (mn > d) mn = d, L = l, R = r;
        if (j - siz[x] < 0) break;
        l = min(l, p[x][j - siz[x]]);
    }
    if (m - mn < n * k) {puts("-1"); return ;}
    rep (i, L, R) {
        int x = a[i];
        if (vis[x]) {
            if (siz[x]) v[i] = 1, --siz[x];
        }
    } int c = min(R - L + 1, k) - s; int len = 0;
    rep (i, L, R) {
        int x = a[i];
        if (!v[i]) {
            if (c) --c;
            else ans[++len] = i;
        }
    }
    int t = (L - 1) / k;
    int rr = t * k + 1;
    rep (i, rr, L - 1) ans[++len] = i; --rr;
    if (rr > (n - 1) * k) {
        int c = rr - (n - 1) * k;
        rep (i, 1, c) ans[++len] = i;
    }
    pr2(len); sort(ans + 1, ans + len + 1);
    rep (i, 1, len) pr1(ans[i]);
}

int main() {
    //int T; qr(T); while (T--) {
        solve();
    //}
    return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <iostream>
#include <ctime>
#include <bitset>
#define gc getchar()
#define ll long long
#define il inline
#define fi first
#define se second
#define mk make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define repn(i, b, a) for (int i = b; i >= a; --i)
#define ite iterator

using namespace std;

const int N = 5e5 + 5, mod = 998244353;

template<class o> il void qr(o &x) {
    x = 0; char c = gc; int f = 1;
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = gc;}
    while (c >= '0' && c <= '9') {x = x * 10 + (c ^ 48); c = gc;}
    x *= f;
}

template<class o> void qw(o x) {
    if(x / 10) qw(x / 10); putchar(x % 10 + 48);
}

template<class o> void pr1(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); putchar(' ');
}

template<class o> void pr2(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); puts("");
}

il int ksm(int a, int b = mod - 2) {
    int ans = 1;
    for (; b; b >>= 1, a = 1ll * a * a % mod)
        if (b & 1) ans = 1ll * ans * a % mod;
    return ans;
}

il int add(int a, int b) {return a += b, a >= mod ? a - mod : a;}
il int sub(int a, int b) {return a -= b, a < 0 ? a + mod : a;}

/* code */

vector<int> p[N];
pii q[N]; int a[N], b[N], siz[N];
bool vis[N], v[N]; int ans[N];

bool cmp(pii a, pii b) {
    return a.fi > b.fi;
}

void solve() {
    int m, n, k, s; qr(m), qr(k), qr(n), qr(s);
    rep (i, 1, m) qr(a[i]), p[a[i]].pb(i); int cnt = 0;
    rep (i, 1, s) {
        int x; qr(x);
        if (vis[x]) ++siz[x];
        else vis[x] = 1, b[++cnt] = x, siz[x] = 1;
    } int tmp = 0, r, l = 0x3f3f3f3f;
    rep (i, 1, cnt) {
        int x = b[i];
        if (siz[x] > p[x].size()) {puts("-1"); return ;}
        int sz = p[x].size();
        rep (j, 0, sz - 1) q[++tmp] = mk(p[x][j], j);
        l = min(l, p[x][sz - siz[x]]);
    } sort(q + 1, q + tmp + 1, cmp);
    int mn = 0x3f3f3f3f, L = 0, R = 0;
    rep (i, 1, tmp) {
        r = q[i].fi; int j = q[i].se, x = a[q[i].fi];
        int sum = min(r - l + 1, k);
        int d = r - l + 1 - sum;
        d += (l - 1 + k) % k;
        if (mn > d) mn = d, L = l, R = r;
        if (j - siz[x] < 0) break;
        l = min(l, p[x][j - siz[x]]);
    }
    if (m - mn < n * k) {puts("-1"); return ;}
    rep (i, L, R) {
        int x = a[i];
        if (vis[x]) {
            if (siz[x]) v[i] = 1, --siz[x];
        }
    } int c = min(R - L + 1, k) - s; int len = 0;
    rep (i, L, R) {
        int x = a[i];
        if (!v[i]) {
            if (c) --c;
            else ans[++len] = i;
        }
    }
    int pos = L - (L - 1 + k) % k + 1;
    rep (i, pos, L - 1) ans[++len] = i;
    if (pos - 1 >= (n - 1) * k) {
        int cost = (pos - 1) - (n - 1) * k;
        rep (i, 1, cost) ans[++len] = i;
    }
    pr2(len); sort(ans + 1, ans + len + 1);
    rep (i, 1, len) pr1(ans[i]);
}

int main() {
    //int T; qr(T); while (T--) {
        solve();
    //}
    return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <iostream>
#include <ctime>
#include <bitset>
#define gc getchar()
#define ll long long
#define il inline
#define fi first
#define se second
#define mk make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define repn(i, b, a) for (int i = b; i >= a; --i)
#define ite iterator

using namespace std;

const int N = 5e5 + 5, mod = 998244353;

template<class o> il void qr(o &x) {
    x = 0; char c = gc; int f = 1;
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = gc;}
    while (c >= '0' && c <= '9') {x = x * 10 + (c ^ 48); c = gc;}
    x *= f;
}

template<class o> void qw(o x) {
    if(x / 10) qw(x / 10); putchar(x % 10 + 48);
}

template<class o> void pr1(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); putchar(' ');
}

template<class o> void pr2(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); puts("");
}

il int ksm(int a, int b = mod - 2) {
    int ans = 1;
    for (; b; b >>= 1, a = 1ll * a * a % mod)
        if (b & 1) ans = 1ll * ans * a % mod;
    return ans;
}

il int add(int a, int b) {return a += b, a >= mod ? a - mod : a;}
il int sub(int a, int b) {return a -= b, a < 0 ? a + mod : a;}

/* code */

vector<int> p[N];
pii q[N]; int a[N], b[N], siz[N];
bool vis[N], v[N]; int ans[N];

bool cmp(pii a, pii b) {
    return a.fi > b.fi;
}

void solve() {
    int m, n, k, s; qr(m), qr(k), qr(n), qr(s);
    rep (i, 1, m) qr(a[i]), p[a[i]].pb(i); int cnt = 0;
    rep (i, 1, s) {
        int x; qr(x);
        if (vis[x]) ++siz[x];
        else vis[x] = 1, b[++cnt] = x, siz[x] = 1;
    } int tmp = 0, r, l = 0x3f3f3f3f;
    rep (i, 1, cnt) {
        int x = b[i];
        if (siz[x] > p[x].size()) {puts("-1"); return ;}
        int sz = p[x].size();
        rep (j, 0, sz - 1) q[++tmp] = mk(p[x][j], j);
        l = min(l, p[x][sz - siz[x]]);
    } sort(q + 1, q + tmp + 1, cmp);
    int mn = 0x3f3f3f3f, L = 0, R = 0;
    rep (i, 1, tmp) {
        r = q[i].fi; int j = q[i].se, x = a[q[i].fi];
        int t = (r - 1) / k;
        if (t * k + 1 <= l && (t + 1) * k >= r && t < n) {
            puts("0"); return ;
        }
        int sum = min(r - l + 1 + (l - 1 + k) % k, k);
        int d = r - l + 1 + (l - 1 + k) % k - sum;
        if (mn > d) mn = d, L = l, R = r;
        if (j - siz[x] < 0) break;
        l = min(l, p[x][j - siz[x]]);
    }
    if (m - mn < n * k) {puts("-1"); return ;}
    rep (i, L, R) {
        int x = a[i];
        if (vis[x]) {
            if (siz[x]) v[i] = 1, --siz[x];
        }
    } int c = min(R - L + 1, k) - s; int len = 0;
    rep (i, L, R) {
        int x = a[i];
        if (!v[i]) {
            if (c) --c;
            else ans[++len] = i;
        }
    }
    int t = (L - 1) / k;
    int rr = t * k + 1;
    rep (i, rr, L - 1) ans[++len] = i; --rr;
    if (rr > (n - 1) * k) {
        int c = rr - (n - 1) * k;
        rep (i, 1, c) ans[++len] = i;
    }
    pr2(len); sort(ans + 1, ans + len + 1);
    rep (i, 1, len) pr1(ans[i]);
}

int main() {
    //int T; qr(T); while (T--) {
        solve();
    //}
    return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <iostream>
#include <ctime>
#include <bitset>
#define gc getchar()
#define ll long long
#define il inline
#define fi first
#define se second
#define mk make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define repn(i, b, a) for (int i = b; i >= a; --i)
#define ite iterator

using namespace std;

const int N = 5e5 + 5, mod = 998244353;

template<class o> il void qr(o &x) {
    x = 0; char c = gc; int f = 1;
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = gc;}
    while (c >= '0' && c <= '9') {x = x * 10 + (c ^ 48); c = gc;}
    x *= f;
}

template<class o> void qw(o x) {
    if(x / 10) qw(x / 10); putchar(x % 10 + 48);
}

template<class o> void pr1(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); putchar(' ');
}

template<class o> void pr2(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); puts("");
}

il int ksm(int a, int b = mod - 2) {
    int ans = 1;
    for (; b; b >>= 1, a = 1ll * a * a % mod)
        if (b & 1) ans = 1ll * ans * a % mod;
    return ans;
}

il int add(int a, int b) {return a += b, a >= mod ? a - mod : a;}
il int sub(int a, int b) {return a -= b, a < 0 ? a + mod : a;}

/* code */

vector<int> p[N];
pii q[N]; int a[N], b[N], siz[N];
bool vis[N], v[N]; int ans[N];

bool cmp(pii a, pii b) {
    return a.fi > b.fi;
}

void solve() {
    int m, n, k, s; qr(m), qr(k), qr(n), qr(s);
    rep (i, 1, m) qr(a[i]), p[a[i]].pb(i); int cnt = 0;
    rep (i, 1, s) {
        int x; qr(x);
        if (vis[x]) ++siz[x];
        else vis[x] = 1, b[++cnt] = x, siz[x] = 1;
    } int tmp = 0, r, l = 0x3f3f3f3f;
    rep (i, 1, cnt) {
        int x = b[i];
        if (siz[x] > p[x].size()) {puts("-1"); return ;}
        int sz = p[x].size();
        rep (j, 0, sz - 1) q[++tmp] = mk(p[x][j], j);
        l = min(l, p[x][sz - siz[x]]);
    } sort(q + 1, q + tmp + 1, cmp);
    int mn = 0x3f3f3f3f, L = 0, R = 0;
    rep (i, 1, tmp) {
        r = q[i].fi; int j = q[i].se, x = a[q[i].fi];
        int t = (r - 1) / k;
        if (t * k + 1 >= l && (t + 1) * k <= r && t < n) {puts("0"); return ;}
        int sum = min(r - l + 1 + (l - 1 + k) % k, k);
        int d = r - l + 1 + (l - 1 + k) % k - sum;
        if (mn > d) mn = d, L = l, R = r;
        if (j - siz[x] < 0) break;
        l = min(l, p[x][j - siz[x]]);
    }
    if (m - mn < n * k) {puts("-1"); return ;}
    rep (i, L, R) {
        int x = a[i];
        if (vis[x]) {
            if (siz[x]) v[i] = 1, --siz[x];
        }
    } int c = min(R - L + 1, k) - s; int len = 0;
    rep (i, L, R) {
        int x = a[i];
        if (!v[i]) {
            if (c) --c;
            else ans[++len] = i;
        }
    }
    int t = (L - 1) / k;
    int rr = t * k + 1;
    rep (i, rr, L - 1) ans[++len] = i; --rr;
    if (rr > (n - 1) * k) {
        int c = rr - (n - 1) * k;
        rep (i, 1, c) ans[++len] = i;
    }
    pr2(len); sort(ans + 1, ans + len + 1);
    rep (i, 1, len) pr1(ans[i]);
}

int main() {
    //int T; qr(T); while (T--) {
        solve();
    //}
    return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <iostream>
#include <ctime>
#include <bitset>
#define gc getchar()
#define ll long long
#define il inline
#define fi first
#define se second
#define mk make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define repn(i, b, a) for (int i = b; i >= a; --i)
#define ite iterator

using namespace std;

const int N = 5e5 + 5, mod = 998244353;

template<class o> il void qr(o &x) {
    x = 0; char c = gc; int f = 1;
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = gc;}
    while (c >= '0' && c <= '9') {x = x * 10 + (c ^ 48); c = gc;}
    x *= f;
}

template<class o> void qw(o x) {
    if(x / 10) qw(x / 10); putchar(x % 10 + 48);
}

template<class o> void pr1(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); putchar(' ');
}

template<class o> void pr2(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); puts("");
}

il int ksm(int a, int b = mod - 2) {
    int ans = 1;
    for (; b; b >>= 1, a = 1ll * a * a % mod)
        if (b & 1) ans = 1ll * ans * a % mod;
    return ans;
}

il int add(int a, int b) {return a += b, a >= mod ? a - mod : a;}
il int sub(int a, int b) {return a -= b, a < 0 ? a + mod : a;}

/* code */

vector<int> p[N];
pii q[N]; int a[N], b[N], siz[N];
bool vis[N], v[N]; int ans[N];

bool cmp(pii a, pii b) {
    return a.fi > b.fi;
}

void solve() {
    int m, n, k, s; qr(m), qr(k), qr(n), qr(s);
    rep (i, 1, m) qr(a[i]), p[a[i]].pb(i); int cnt = 0;
    rep (i, 1, s) {
        int x; qr(x);
        if (vis[x]) ++siz[x];
        else vis[x] = 1, b[++cnt] = x, siz[x] = 1;
    } int tmp = 0, r, l = 0x3f3f3f3f;
    rep (i, 1, cnt) {
        int x = b[i];
        if (siz[x] > p[x].size()) {puts("-1"); return ;}
        int sz = p[x].size();
        rep (j, 0, sz - 1) q[++tmp] = mk(p[x][j], j);
        l = min(l, p[x][sz - siz[x]]);
    } sort(q + 1, q + tmp + 1, cmp);
    int mn = 0x3f3f3f3f, L = 0, R = 0;
    rep (i, 1, tmp) {
        r = q[i].fi; int j = q[i].se, x = a[q[i].fi];
        int sum = min(r - l + 1, k);
        int d = r - l + 1 - sum;
        d += (l - 1 + k) % k;
        if (mn > d) mn = d, L = l, R = r;
        if (j - siz[x] < 0) break;
        l = min(l, p[x][j - siz[x]]);
    }
    if (m - mn < n * k) {puts("-1"); return ;}
    rep (i, L, R) {
        int x = a[i];
        if (vis[x]) {
            if (siz[x]) v[i] = 1, --siz[x];
        }
    } int c = min(R - L + 1, k) - s; int len = 0;
    rep (i, L, R) {
        int x = a[i];
        if (!v[i]) {
            if (c) --c;
            else ans[++len] = i;
        }
    }
    int pos = L - (L - 1 + k) % k + 1;
    rep (i, pos, L - 1) ans[++len] = i;
    pos = max(min(pos - 1, L - 1), 0);
    if (pos >= (n - 1) * k) {
        int cost = pos - (n - 1) * k;
        rep (i, 1, cost) ans[++len] = i;
    }
    pr2(len); sort(ans + 1, ans + len + 1);
    rep (i, 1, len) pr1(ans[i]);
}

int main() {
    //int T; qr(T); while (T--) {
        solve();
    //}
    return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <iostream>
#include <ctime>
#include <bitset>
#define gc getchar()
#define ll long long
#define il inline
#define fi first
#define se second
#define mk make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define repn(i, b, a) for (int i = b; i >= a; --i)
#define ite iterator

using namespace std;

const int N = 5e5 + 5, mod = 998244353;

template<class o> il void qr(o &x) {
    x = 0; char c = gc; int f = 1;
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = gc;}
    while (c >= '0' && c <= '9') {x = x * 10 + (c ^ 48); c = gc;}
    x *= f;
}

template<class o> void qw(o x) {
    if(x / 10) qw(x / 10); putchar(x % 10 + 48);
}

template<class o> void pr1(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); putchar(' ');
}

template<class o> void pr2(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); puts("");
}

il int ksm(int a, int b = mod - 2) {
    int ans = 1;
    for (; b; b >>= 1, a = 1ll * a * a % mod)
        if (b & 1) ans = 1ll * ans * a % mod;
    return ans;
}

il int add(int a, int b) {return a += b, a >= mod ? a - mod : a;}
il int sub(int a, int b) {return a -= b, a < 0 ? a + mod : a;}

/* code */

vector<int> p[N];
pii q[N]; int a[N], b[N], siz[N];
bool vis[N], v[N]; int ans[N];

bool cmp(pii a, pii b) {
    return a.fi > b.fi;
}

void solve() {
    int m, n, k, s; qr(m), qr(k), qr(n), qr(s);
    rep (i, 1, m) qr(a[i]), p[a[i]].pb(i); int cnt = 0;
    rep (i, 1, s) {
        int x; qr(x);
        if (vis[x]) ++siz[x];
        else vis[x] = 1, b[++cnt] = x, siz[x] = 1;
    } int tmp = 0, r, l = 0x3f3f3f3f;
    rep (i, 1, cnt) {
        int x = b[i];
        if (siz[x] > p[x].size()) {puts("-1"); return ;}
        int sz = p[x].size();
        rep (j, 0, sz - 1) q[++tmp] = mk(p[x][j], j);
        l = min(l, p[x][sz - siz[x]]);
    } sort(q + 1, q + tmp + 1, cmp);
    int mn = 0x3f3f3f3f, L = 0, R = 0;
    rep (i, 1, tmp) {
        r = q[i].fi; int j = q[i].se, x = a[q[i].fi];
        int sum = min(r - l + 1, k);
        int d = r - l + 1 - sum;
        d += (l - 1 + k) % k;
        if (mn > d) mn = d, L = l, R = r;
        if (j - siz[x] < 0) break;
        l = min(l, p[x][j - siz[x]]);
    }
    if (m - mn < n * k) {puts("-1"); return ;}
    rep (i, L, R) {
        int x = a[i];
        if (vis[x]) {
            if (siz[x]) v[i] = 1, --siz[x];
        }
    } int c = min(R - L + 1, k) - s; int len = 0;
    rep (i, L, R) {
        int x = a[i];
        if (!v[i]) {
            if (c) --c;
            else ans[++len] = i;
        }
    }
    int t = (L - 1) / k;
    int rr = t * k + 1;
    rep (i, rr, L - 1) ans[++len] = i; --rr;
    if (rr > (n - 1) * k) {
        int c = rr - (n - 1) * k;
        rep (i, 1, c) ans[++len] = i;
    }
    pr2(len); sort(ans + 1, ans + len + 1);
    rep (i, 1, len) pr1(ans[i]);
}

int main() {
    //int T; qr(T); while (T--) {
        solve();
    //}
    return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <iostream>
#include <ctime>
#include <bitset>
#define gc getchar()
#define ll long long
#define il inline
#define fi first
#define se second
#define mk make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define repn(i, b, a) for (int i = b; i >= a; --i)
#define ite iterator

using namespace std;

const int N = 5e5 + 5, mod = 998244353;

template<class o> il void qr(o &x) {
    x = 0; char c = gc; int f = 1;
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = gc;}
    while (c >= '0' && c <= '9') {x = x * 10 + (c ^ 48); c = gc;}
    x *= f;
}

template<class o> void qw(o x) {
    if(x / 10) qw(x / 10); putchar(x % 10 + 48);
}

template<class o> void pr1(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); putchar(' ');
}

template<class o> void pr2(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); puts("");
}

il int ksm(int a, int b = mod - 2) {
    int ans = 1;
    for (; b; b >>= 1, a = 1ll * a * a % mod)
        if (b & 1) ans = 1ll * ans * a % mod;
    return ans;
}

il int add(int a, int b) {return a += b, a >= mod ? a - mod : a;}
il int sub(int a, int b) {return a -= b, a < 0 ? a + mod : a;}

/* code */

vector<int> p[N];
pii q[N]; int a[N], b[N], siz[N];
bool vis[N], v[N]; int ans[N];

bool cmp(pii a, pii b) {
    return a.fi > b.fi;
}

void solve() {
    int m, n, k, s; qr(m), qr(k), qr(n), qr(s);
    rep (i, 1, m) qr(a[i]), p[a[i]].pb(i); int cnt = 0;
    rep (i, 1, s) {
        int x; qr(x);
        if (vis[x]) ++siz[x];
        else vis[x] = 1, b[++cnt] = x, siz[x] = 1;
    } int tmp = 0, r, l = 0x3f3f3f3f;
    rep (i, 1, cnt) {
        int x = b[i];
        if (siz[x] > p[x].size()) {puts("-1"); return ;}
        int sz = p[x].size();
        rep (j, 0, sz - 1) q[++tmp] = mk(p[x][j], j);
        l = min(l, p[x][sz - siz[x]]);
    } sort(q + 1, q + tmp + 1, cmp);
    int mn = 0x3f3f3f3f, L = 0, R = 0;
    rep (i, 1, tmp) {
        r = q[i].fi; int j = q[i].se, x = a[q[i].fi];
        int sum = min(r - l + 1, k);
        int d = r - l + 1 - sum;
        d += (l - 1 + k) % k;
        if (mn > d) mn = d, L = l, R = r;
        if (j - siz[x] < 0) break;
        l = min(l, p[x][j - siz[x]]);
    }
    if (m - mn < n * k) {puts("-1"); return ;}
    rep (i, L, R) {
        int x = a[i];
        if (vis[x]) {
            if (siz[x]) v[i] = 1, --siz[x];
        }
    } int c = min(R - L + 1, k) - s; int len = 0;
    rep (i, L, R) {
        int x = a[i];
        if (!v[i]) {
            if (c) --c;
            else ans[++len] = i;
        }
    }
    int pos = L - (L - 1 + k) % k + 1;
    rep (i, pos, L - 1) ans[++len] = i;
    pos = max(min(pos - 1, L - 1), 1);
    if (pos >= (n - 1) * k) {
        int cost = pos - (n - 1) * k;
        rep (i, 1, cost) ans[++len] = i;
    }
    pr2(len); sort(ans + 1, ans + len + 1);
    rep (i, 1, len) pr1(ans[i]);
}

int main() {
    //int T; qr(T); while (T--) {
        solve();
    //}
    return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <iostream>
#include <ctime>
#include <bitset>
#define gc getchar()
#define ll long long
#define il inline
#define fi first
#define se second
#define mk make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define repn(i, b, a) for (int i = b; i >= a; --i)
#define ite iterator

using namespace std;

const int N = 5e5 + 5, mod = 998244353;

template<class o> il void qr(o &x) {
    x = 0; char c = gc; int f = 1;
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = gc;}
    while (c >= '0' && c <= '9') {x = x * 10 + (c ^ 48); c = gc;}
    x *= f;
}

template<class o> void qw(o x) {
    if(x / 10) qw(x / 10); putchar(x % 10 + 48);
}

template<class o> void pr1(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); putchar(' ');
}

template<class o> void pr2(o x) {
    if (x < 0) putchar('-'), x = -x;
    qw(x); puts("");
}

il int ksm(int a, int b = mod - 2) {
    int ans = 1;
    for (; b; b >>= 1, a = 1ll * a * a % mod)
        if (b & 1) ans = 1ll * ans * a % mod;
    return ans;
}

il int add(int a, int b) {return a += b, a >= mod ? a - mod : a;}
il int sub(int a, int b) {return a -= b, a < 0 ? a + mod : a;}

/* code */

vector<int> p[N];
pii q[N]; int a[N], b[N], siz[N];
bool vis[N], v[N]; int ans[N], mn, L, R, m, n, k, s;

bool cmp(pii a, pii b) {
    return a.fi > b.fi;
}

void upd(int l, int r) {
    if (r - l + 1 <= k) {
        int t = (l - 1) / k;
        int tl = t * k + 1, tr = t * k + k;
        if (tl <= l && tr >= r) {
            int cnt = 0;
            if (n <= t) {
                cnt += (t - n) * k + (r - tl + 1);
            }
            if (cnt < mn) mn = cnt, L = l, R = r;
        } else {
            int cnt = r - tl + 1;
            cnt = cnt - k;
            if (n <= t) {
                cnt += (t - n + 1) * k;
            }
            if (cnt < mn) mn = cnt, L = l, R = r;
        }
    } else {
        int t = (l - 1) / k;
        int tl = t * k + 1, tr = t * k + k;
        int sum = r - tl + 1;
        int cnt = sum - k;
        if (n <= t) {
            cnt += (t - n + 1) * k;
        }
        if (cnt < mn) mn = cnt, L = l, R = r;
    }
}

void print() {
    if (m - mn < n * k) {puts("-1"); return ;}
    int t = (L - 1) / k, tl = t * k + 1, tr = t * k + k;
    int len = 0;
    if (R - L + 1 <= k) {
        if (tl <= L && tr >= R) {
            if (n <= t) {
                int cnt = (t - n) * k;
                rep (i, 1, cnt) ans[++len] = i;
                cnt = R - tl + 1;
                repn (i, t * k, t * k - cnt + 1) ans[++len] = i;
            }
        } else {
            int cnt = R - tl + 1;
            cnt -= k;
            rep (i, tl, R) {
                if (siz[a[i]]) --siz[a[i]];
                else if (cnt) ans[++len] = i, --cnt;
            }
            if (n <= t) {
                cnt = (t - n + 1) * k;
                rep (i, 1, cnt) ans[++len] = i;
            }
        }
    }
    else {
        int sum = R - tl + 1;
        int cnt = sum - k;
        rep (i, tl, L - 1) {
            if (cnt) --cnt, ans[++len] =i;
        }
        rep (i, L, R) {
            if (siz[a[i]]) --siz[a[i]];
            else if (cnt) --cnt, ans[++len] = i;
        }
        if (n <= t) {
            cnt = (t - n + 1) * k;
            rep (i, 1, cnt) ans[++len] = i;
        }
    }
    pr2(len); sort(ans + 1, ans + len + 1);
    rep (i, 1, len) pr1(ans[i]);

}

void solve() {
    qr(m), qr(k), qr(n), qr(s);
    rep (i, 1, m) qr(a[i]), p[a[i]].pb(i); int cnt = 0;
    rep (i, 1, s) {
        int x; qr(x);
        if (vis[x]) ++siz[x];
        else vis[x] = 1, b[++cnt] = x, siz[x] = 1;
    } int tmp = 0, r, l = 0x3f3f3f3f;
    rep (i, 1, cnt) {
        int x = b[i];
        if (siz[x] > p[x].size()) {puts("-1"); return ;}
        int sz = p[x].size();
        rep (j, 0, sz - 1) q[++tmp] = mk(p[x][j], j);
        l = min(l, p[x][sz - siz[x]]);
    } sort(q + 1, q + tmp + 1, cmp);
    mn = 0x3f3f3f3f, L = 0, R = 0;
    rep (i, 1, tmp) {
        r = q[i].fi; int j = q[i].se, x = a[q[i].fi];
        upd(l, r);
        if (j - siz[x] < 0) break;
        l = min(l, p[x][j - siz[x]]);
    } print();
}

int main() {
    //int T; qr(T); while (T--) {
        solve();
    //}
    return 0;
}