/* package whatever; // don't place package name! */

import java.text.*;
import java.util.*;

class Main{
  static void c(String... a) throws Exception{
    DateFormat f = new SimpleDateFormat("dd-MM-yyyy");
    Calendar s = Calendar.getInstance(),
             e = Calendar.getInstance();
    s.setTime(f.parse(a[0]));
    e.setTime(f.parse(a[1]));
    for(Date d = s.getTime(); s.before(e); s.add(Calendar.DATE, 1), d = s.getTime()){
      String o = f.format(d),
             x = o.replaceAll("\\W|_", ""),
             w = "";
      for(char c : x.toCharArray()){
      	w = c + w;
      }
      if(x.equals(w)){
        System.out.println(o);
      }
    }
  }

  public static void main(String[] a){
    try{
      c("05-02-2050", "12-12-2060");
    } catch (Exception e){}
  }
}