Valera is a collector. Once he wanted to expand his collection with exactly one antique item.

Valera knows n sellers of antiques, the i-th of them auctioned ki items. Currently the auction price of the j-th object of the i-th seller is sij. Valera gets on well with each of the n sellers. He is perfectly sure that if he outbids the current price of one of the items in the auction (in other words, offers the seller the money that is strictly greater than the current price of the item at the auction), the seller of the object will immediately sign a contract with him.

Unfortunately, Valera has only v units of money. Help him to determine which of the n sellers he can make a deal with.

Input

The first line contains two space-separated integers n, v (1 ≤ n ≤ 50; 104 ≤ v ≤ 106) — the number of sellers and the units of money the Valera has.

Then n lines follow. The i-th line first contains integer ki (1 ≤ ki ≤ 50) the number of items of the i-th seller. Then go ki space-separated integers si1, si2, ..., siki (104 ≤ sij ≤ 106) — the current prices of the items of the i-th seller. 

Output

In the first line, print integer p — the number of sellers with who Valera can make a deal.

In the second line print p space-separated integers q1, q2, ..., qp (1 ≤ qi ≤ n) — the numbers of the sellers with who Valera can make a deal. Print the numbers of the sellers in the increasing order. 

Examples

Input

3 50000
1 40000
2 20000 60000
3 10000 70000 190000


Output

3
1 2 3


Input

3 50000
1 50000
3 100000 120000 110000
3 120000 110000 120000


Output

0

Note

In the first sample Valera can bargain with each of the sellers. He can outbid the following items: a 40000 item from the first seller, a 20000 item from the second seller, and a 10000 item from the third seller.

In the second sample Valera can not make a deal with any of the sellers, as the prices of all items in the auction too big for him.
import java.io.*; 
import java.lang.reflect.Array; 
import java.math.BigDecimal;
import java.math.BigInteger; 
import java.util.*; 
import java.util.Map.Entry;

import static java.lang.Math.*; 
   
public class solver implements Runnable { 
        final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null; 
        BufferedReader in; 
        PrintWriter out; 
        StringTokenizer tok = new StringTokenizer(""); 
          
        String readString() throws IOException{ 
                while(!tok.hasMoreTokens()){ 
                        try{ 
                                tok = new StringTokenizer(in.readLine()); 
                        }catch (Exception e){ 
                                return null; 
                        } 
                } 
                return tok.nextToken(); 
        } 
        String readString(String delim) throws IOException{ 
            while(!tok.hasMoreTokens()){ 
                    try{ 
                            tok = new StringTokenizer(in.readLine()); 
                    }catch (Exception e){ 
                            return null; 
                    } 
            } 
            return tok.nextToken(delim); 
    } 
         
        int readInt() throws IOException{ 
                return Integer.parseInt(readString()); 
        }   
        long readLong() throws IOException{ 
                return Long.parseLong(readString()); 
        }       
        double readDouble() throws IOException{ 
                return Double.parseDouble(readString()); 
        }  
        char readChar() throws IOException { 
            char val = 0; 
            do{ 
                val = (char) in.read(); 
            }while(val == '\n' || val == '\r'); 
            return val; 
        } 
        char readChar(String skipChars)throws IOException{ 
            char val = 0; 
            boolean ret; 
            do{ 
                val = (char) in.read(); 
                ret = false; 
                for (int i = skipChars.length()-1; i >= 0; i--){ 
                    if (skipChars.charAt(i) == val){ 
                        ret = true; 
                        break; 
                    } 
                } 
            }while(ret); 
            return val; 
        } 
          
        void readIntArray(int[] arr, int start, int count) throws IOException{ 
            for (int i = 0; i < count; i++){ 
                arr[i+start] = readInt(); 
            } 
        } 
          
        public class Pair<T1,T2> { 
            public T1 x1; 
            public T2 x2; 
            public Pair(){}; 
            public Pair(T1 x1, T2 x2){ 
                this.x1 = x1; 
                this.x2 = x2; 
            } 
            public String toString(){ 
                return x1.toString() + " " + x2.toString(); 
            } 
        } 
        public class Point implements Comparable<Point>{ 
            public int x1, x2; 
            public Point(){} 
            public Point(int a, int b){x1 = a;x2=b;} 
            public int compareTo(Point o) { 
                if (x2 == o.x2) return (x1 - o.x1);                 
                return (x2-o.x2);  
                // (x1-o.x1) - increase; -(x1-o.x1) - decrease 
            } 
            public String toString(){ 
                return x1 + ":" + x2; 
            } 
            public boolean equals(Object o){
                Point p = (Point)o;
                return x1 ==p.x2;
            }
        } 
        public class Tree implements Comparable<Tree>{ 
            public int x1, x2, x3; 
            public Tree(){} 
            public Tree(int a, int b, int c){x1 = a;x2=b;x3=c;} 
            public int compareTo(Tree o) {
                if(x1 == o.x1 && x2 == o.x2) return x3-o.x3;
                if(x1 == o.x1) return x2-o.x2;
                return (x1-o.x1);  
                // (x1-o.x1) - increase; -(x1-o.x1) - decrease 
            } 
            public String toString(){ 
                return x1 + ":" + x2 + ":" + x3; 
            } 
        } 
        
        public class Four implements Comparable<Four>{ 
            public int x1, x2;
            boolean x3, x4;
            public Four(){} 
            public Four(int a, int b, int c, int d){x1 = a;x2=b;} 
            public int compareTo(Four o) {
                if(x1 == o.x1) return x2-o.x2;
                return (x1-o.x1);  
                // (x1-o.x1) - increase; -(x1-o.x1) - decrease 
            } 
            public String toString(){ 
                return x1 + ":" + x2 + ":" + x3  + ":" + x4; 
            }
        } 
//----------------------------------------         
        
        public void solve() throws IOException {
            int n = readInt();
            int v = readInt();
            TreeSet<Integer> arr = new TreeSet<Integer>();
            for (int i = 0; i < n; i++){
                int k = readInt();
                for (int j = 0 ; j < k; j++){
                    if (v > readInt()){
                        arr.add(i+1);
                    }
                }
            }
            out.println(arr.size());
            for (Integer a : arr){
                out.print(a + " ");
            }
        }
          
//---------------------------------------- 
        public static void main(String[] args){ 
                new Thread(null, new solver(), "", 256 * (1L << 20)).start(); 
        } 
         
        public void run(){ 
                try{ 
                        timeBegin = System.currentTimeMillis(); 
                        try{ 
                            if (ONLINE_JUDGE){ 
                                in = new BufferedReader(new InputStreamReader(System.in)); 
                                out = new PrintWriter(System.out); 
                            }  
                            else { 
                                in = new BufferedReader(new FileReader("input.txt")); 
                                out = new PrintWriter("output.txt"); 
                            } 
                        }catch(Throwable e){
                            in = new BufferedReader(new InputStreamReader(System.in)); 
                            out = new PrintWriter(System.out); 
                        }
                          
                        solve(); 
                        out.close(); 
                          
                        timeEnd = System.currentTimeMillis(); 
                        System.err.println("Time = " + (timeEnd - timeBegin)); 
                }catch (Exception e){ 
                        e.printStackTrace(System.err); 
                        System.exit(-1); 
                } 
        } 
         
        long timeBegin, timeEnd; 
   
          
//----------             
        void update(int[] doo, int v, int i, int val, int ll, int rr){ 
            if (ll == rr){ 
                doo[v] = val; 
            }else{ 
                int med = ll + ((rr-ll)>>1); 
                  
                if (i <= med){ 
                    update(doo, v<<1, i, val, ll, med); 
                }else{ 
                    update(doo, (v<<1)+1, i, val, med+1, rr); 
                } 
                doo[v] = min(doo[v<<1],doo[(v<<1)+1]); 
            } 
        } 
        int get(int[] doo, int v, int l, int r, int ll, int rr){ 
            if (l > r){ 
                return Integer.MAX_VALUE; 
            } 
            if (ll == l && r == rr){ 
                return doo[v]; 
            } 
            int med = ll + ((rr-ll)>>1);
            return min(get(doo, v<<1, l, min(r, med), ll, med),  
                    get(doo, (v<<1)+1, max(l, med+1), r, med+1, rr)); 
        } 
 //----------------------------------------

        int BinSearch(int[] a, int x, boolean increase){

            int first = 0;
            int last = a.length;
            
            if (increase){
                while (first <= last) {
                    int mid = first + (last - first) / 2;                
                    if (x <= a[mid])
                        last = mid;
                    else
                        first = mid + 1;
                }
                return last;
            }else{
                while (first <= last) {
                    int mid = first + (last - first) / 2;                
                    if (x > a[mid])
                        last = mid;
                    else
                        first = mid + 1;
                }
                return first;
            }
        }
        
        
//-----------------------------------------
}