#include <bits/stdc++.h>
 
int main() {
  char s[4];
  fgets(s, 4, stdin);
  if(s[0] == '1') puts("1\n2\n3\n4\n5\n6\n7\n8\n9\n19\n");
  else puts("1\n2\n3\n4\n5\n6\n7\n8\n9\n19\n29\n39\n49\n59\n69\n79\n89\n99\n199\n299\n399\n499\n599\n699\n799\n899\n999\n1099\n1199\n1299\n1399\n1499\n1599\n1699\n1799\n1899\n1999\n2999\n3999\n4999\n5999\n6999\n7999\n8999\n9999\n10999\n11999\n12999\n13999\n14999\n15999\n16999\n17999\n18999\n19999\n20999\n21999\n22999\n23999\n24999\n25999\n26999\n27999\n28999\n29999\n39999\n49999\n59999\n69999\n79999\n89999\n99999\n109999\n119999\n129999\n139999\n149999\n159999\n169999\n179999\n189999\n199999\n209999\n219999\n229999\n239999\n249999\n259999\n269999\n279999\n289999\n299999\n309999\n319999\n329999\n339999\n349999\n359999\n369999\n379999\n389999\n399999\n499999\n599999\n699999\n799999\n899999\n999999\n1099999\n1199999\n1299999\n1399999\n1499999\n1599999\n1699999\n1799999\n1899999\n1999999\n2099999\n2199999\n2299999\n2399999\n2499999\n2599999\n2699999\n2799999\n2899999\n2999999\n3099999\n3199999\n3299999\n3399999\n3499999\n3599999\n3699999\n3799999\n3899999\n3999999\n4099999\n4199999\n4299999\n4399999\n4499999\n4599999\n4699999\n4799999\n4899999\n4999999\n5999999\n6999999\n7999999\n8999999\n9999999\n10999999\n11999999\n12999999\n13999999\n14999999\n15999999\n16999999\n17999999\n18999999\n19999999\n20999999\n21999999\n22999999\n23999999\n24999999\n25999999\n26999999\n27999999\n28999999\n29999999\n30999999\n31999999\n32999999\n33999999\n34999999\n35999999\n36999999\n37999999\n38999999\n39999999\n40999999\n41999999\n42999999\n43999999\n44999999\n45999999\n46999999\n47999999\n48999999\n49999999\n50999999\n51999999\n52999999\n53999999\n54999999\n55999999\n56999999\n57999999\n58999999\n59999999\n69999999\n79999999\n89999999\n99999999\n109999999\n119999999\n129999999\n139999999\n149999999\n159999999\n169999999\n179999999\n189999999\n199999999\n209999999\n219999999\n229999999\n239999999\n249999999\n259999999\n269999999\n279999999\n289999999\n299999999\n309999999\n319999999\n329999999\n339999999\n349999999\n359999999\n369999999\n379999999\n389999999\n399999999\n409999999\n419999999\n429999999\n439999999\n449999999\n459999999\n469999999\n479999999\n489999999\n499999999\n509999999\n519999999\n529999999\n539999999\n549999999\n559999999\n569999999\n579999999\n589999999\n599999999\n609999999\n619999999\n629999999\n639999999\n649999999\n659999999\n669999999\n679999999\n689999999\n699999999\n799999999\n899999999\n999999999\n1099999999\n1199999999\n1299999999\n1399999999\n1499999999\n1599999999\n1699999999\n1799999999\n1899999999\n1999999999\n2099999999\n2199999999\n2299999999\n2399999999\n2499999999\n2599999999\n2699999999\n2799999999\n2899999999\n2999999999\n3099999999\n3199999999\n3299999999\n3399999999\n3499999999\n3599999999\n3699999999\n3799999999\n3899999999\n3999999999\n4099999999\n4199999999\n4299999999\n4399999999\n4499999999\n4599999999\n4699999999\n4799999999\n4899999999\n4999999999\n5099999999\n5199999999\n5299999999\n5399999999\n5499999999\n5599999999\n5699999999\n5799999999\n5899999999\n5999999999\n6099999999\n6199999999\n6299999999\n6399999999\n6499999999\n6599999999\n6699999999\n6799999999\n6899999999\n6999999999\n7099999999\n7199999999\n7299999999\n7399999999\n7499999999\n7599999999\n7699999999\n7799999999\n7899999999\n7999999999\n8999999999\n9999999999\n10999999999\n11999999999\n12999999999\n13999999999\n14999999999\n15999999999\n16999999999\n17999999999\n18999999999\n19999999999\n20999999999\n21999999999\n22999999999\n23999999999\n24999999999\n25999999999\n26999999999\n27999999999\n28999999999\n29999999999\n30999999999\n31999999999\n32999999999\n33999999999\n34999999999\n35999999999\n36999999999\n37999999999\n38999999999\n39999999999\n40999999999\n41999999999\n42999999999\n43999999999\n44999999999\n45999999999\n46999999999\n47999999999\n48999999999\n49999999999\n50999999999\n51999999999\n52999999999\n53999999999\n54999999999\n55999999999\n56999999999\n57999999999\n58999999999\n59999999999\n60999999999\n61999999999\n62999999999\n63999999999\n64999999999\n65999999999\n66999999999\n67999999999\n68999999999\n69999999999\n70999999999\n71999999999\n72999999999\n73999999999\n74999999999\n75999999999\n76999999999\n77999999999\n78999999999\n79999999999\n80999999999\n81999999999\n82999999999\n83999999999\n84999999999\n85999999999\n86999999999\n87999999999\n88999999999\n89999999999\n99999999999\n109999999999\n119999999999\n129999999999\n139999999999\n149999999999\n159999999999\n169999999999\n179999999999\n189999999999\n199999999999\n209999999999\n219999999999\n229999999999\n239999999999\n249999999999\n259999999999\n269999999999\n279999999999\n289999999999\n299999999999\n309999999999\n319999999999\n329999999999\n339999999999\n349999999999\n359999999999\n369999999999\n379999999999\n389999999999\n399999999999\n409999999999\n419999999999\n429999999999\n439999999999\n449999999999\n459999999999\n469999999999\n479999999999\n489999999999\n499999999999\n509999999999\n519999999999\n529999999999\n539999999999\n549999999999\n559999999999\n569999999999\n579999999999\n589999999999\n599999999999\n609999999999\n619999999999\n629999999999\n639999999999\n649999999999\n659999999999\n669999999999\n679999999999\n689999999999\n699999999999\n709999999999\n719999999999\n729999999999\n739999999999\n749999999999\n759999999999\n769999999999\n779999999999\n789999999999\n799999999999\n809999999999\n819999999999\n829999999999\n839999999999\n849999999999\n859999999999\n869999999999\n879999999999\n889999999999\n899999999999\n909999999999\n919999999999\n929999999999\n939999999999\n949999999999\n959999999999\n969999999999\n979999999999\n989999999999\n999999999999\n1099999999999\n1199999999999\n1299999999999\n1399999999999\n1499999999999\n1599999999999\n1699999999999\n1799999999999\n1899999999999\n1999999999999\n2099999999999\n2199999999999\n2299999999999\n2399999999999\n2499999999999\n2599999999999\n2699999999999\n2799999999999\n2899999999999\n2999999999999\n3099999999999\n3199999999999\n3299999999999\n3399999999999\n3499999999999\n3599999999999\n3699999999999\n3799999999999\n3899999999999\n3999999999999\n4099999999999\n4199999999999\n4299999999999\n4399999999999\n4499999999999\n4599999999999\n4699999999999\n4799999999999\n4899999999999\n4999999999999\n5099999999999\n5199999999999\n5299999999999\n5399999999999\n5499999999999\n5599999999999\n5699999999999\n5799999999999\n5899999999999\n5999999999999\n6099999999999\n6199999999999\n6299999999999\n6399999999999\n6499999999999\n6599999999999\n6699999999999\n6799999999999\n6899999999999\n6999999999999\n7099999999999\n7199999999999\n7299999999999\n7399999999999\n7499999999999\n7599999999999\n7699999999999\n7799999999999\n7899999999999\n7999999999999\n8099999999999\n8199999999999\n8299999999999\n8399999999999\n8499999999999\n8599999999999\n8699999999999\n8799999999999\n8899999999999\n8999999999999\n9099999999999\n9199999999999\n9299999999999\n9399999999999\n9499999999999\n9599999999999\n9699999999999\n9799999999999\n9899999999999\n9999999999999\n10999999999999\n11999999999999\n12999999999999\n13999999999999\n14999999999999\n15999999999999\n16999999999999\n17999999999999\n18999999999999\n19999999999999\n20999999999999\n21999999999999\n22999999999999\n23999999999999\n24999999999999\n25999999999999\n26999999999999\n27999999999999\n28999999999999\n29999999999999\n30999999999999\n31999999999999\n32999999999999\n33999999999999\n34999999999999\n35999999999999\n36999999999999\n37999999999999\n38999999999999\n39999999999999\n40999999999999\n41999999999999\n42999999999999\n43999999999999\n44999999999999\n45999999999999\n46999999999999\n47999999999999\n48999999999999\n49999999999999\n50999999999999\n51999999999999\n52999999999999\n53999999999999\n54999999999999\n55999999999999\n56999999999999\n57999999999999\n58999999999999\n59999999999999\n60999999999999\n61999999999999\n62999999999999\n63999999999999\n64999999999999\n65999999999999\n66999999999999\n67999999999999\n68999999999999\n69999999999999\n70999999999999\n71999999999999\n72999999999999\n73999999999999\n74999999999999\n75999999999999\n76999999999999\n77999999999999\n78999999999999\n79999999999999\n80999999999999\n81999999999999\n82999999999999\n83999999999999\n84999999999999\n85999999999999\n86999999999999\n87999999999999\n88999999999999\n89999999999999\n90999999999999\n91999999999999\n92999999999999\n93999999999999\n94999999999999\n95999999999999\n96999999999999\n97999999999999\n98999999999999\n99999999999999\n100999999999999\n101999999999999\n102999999999999\n103999999999999\n104999999999999\n105999999999999\n106999999999999\n107999999999999\n108999999999999\n109999999999999\n119999999999999\n129999999999999\n139999999999999\n149999999999999\n159999999999999\n169999999999999\n179999999999999\n189999999999999\n199999999999999\n209999999999999\n219999999999999\n229999999999999\n239999999999999\n249999999999999\n259999999999999\n269999999999999\n279999999999999\n289999999999999\n299999999999999\n309999999999999\n319999999999999\n329999999999999\n339999999999999\n349999999999999\n359999999999999\n369999999999999\n379999999999999\n389999999999999\n399999999999999\n409999999999999\n419999999999999\n429999999999999\n439999999999999\n449999999999999\n459999999999999\n469999999999999\n479999999999999\n489999999999999\n499999999999999\n509999999999999\n519999999999999\n529999999999999\n539999999999999\n549999999999999\n559999999999999\n569999999999999\n579999999999999\n589999999999999\n599999999999999\n609999999999999\n619999999999999\n629999999999999\n639999999999999\n649999999999999\n659999999999999\n669999999999999\n679999999999999\n689999999999999\n699999999999999\n709999999999999\n719999999999999\n729999999999999\n739999999999999\n749999999999999\n759999999999999\n769999999999999\n779999999999999\n789999999999999\n799999999999999\n809999999999999\n819999999999999\n829999999999999\n839999999999999\n849999999999999\n859999999999999\n869999999999999\n879999999999999\n889999999999999\n899999999999999\n909999999999999\n919999999999999\n929999999999999\n939999999999999\n949999999999999\n959999999999999\n969999999999999\n979999999999999\n989999999999999\n999999999999999");
  return 0;
}


Measured memory_bytes: 256