import java.util.*;

public class a{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int a[] = new int[n];

        for(int i=0;i<n;i++){
            a[i] = sc.nextInt();
        }
        int max = 0;
        int count = 0;
        for(int i=1;i<n;i++){
            if(a[i-1] > a[i]){
                count = 1;
            }
            else{
                count+=1;
                if(count > max){
                    max = count;
                }

            }

        }
        System.out.println(count);
    }
}


import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.ArrayList;
public class Main {

    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);
        int n= scan.nextInt();
        int k =scan.nextInt();

        int j = 0;
        int sum = 0;
        int bs=0;
        int bmax=0;
        int prs[] = new int[n];
        for(int i = 0;i<n;i++)
        {

            prs[i] = scan.nextInt();
        }
        for(int i = 0;i<n;i++)
        {

            int p = prs[i];
            sum+=p;
            bs++;
            if(sum<=k)
            {

                if(bs>bmax)
                {
                    bmax = bs;
                }
            }
            else
            {
                while(j<=i&&sum>k)
                {
                    sum-=prs[j];
                    bs--;
                    j++;
                }
            }
        }
        System.out.print(bmax);

    }

}


import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int t = in.nextInt();
        int a[]=new int[n+1];
        for(int i=1;i<=n;i++){
            a[i]=in.nextInt();
        }

        long current=0;
        int start=1;
        int max=0;

        for(int i=1;i<=n;i++){
            current+=a[i];
            if(current>t){
                while(current>t && start<i){
                    current-=a[start];
                    start++;
                }
            }
            if(current<=t && max<i-start+1)
                max=i-start+1;
        }

        System.out.println(max);

    }
}


import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int t = in.nextInt();
        long times[]=new long [n];
        for(int i=0;i<n;i++) times[i]=in.nextInt();
        long curr_sum=times[0];
        int start =0,i;
        int max=0;
        for(i=1;i<=n;i++){
            while(curr_sum>t && start<i-1){
                curr_sum-=times[start];
                start++;
            }
            if(curr_sum<=t && max<i-start)
                max=i-start;

            if(i<n)
                curr_sum+=times[i];
        }
        System.out.println(max);

    }
}


import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int t = in.nextInt();
        int a[]=new int[n+1];
        for(int i=1;i<=n;i++){
            a[i]=in.nextInt();
        }

        long current=0;
        int start=1;
        int max=1;

        for(int i=1;i<=n;i++){
            current+=a[i];
            if(current>t){
                while(current>t && start<i){
                    current-=a[start];
                    start++;
                }
            }
            if(current<=t && max<i-start+1)
                max=i-start+1;
        }

        System.out.println(max);

    }
}


import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.InputStream;
import static java.lang.Math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException{
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {
        public void solve(int testNumber, InputReader in, OutputWriter out) throws IOException{
            int n = in.readInt();
            long t = in.readLong();
            long[] arr = new long[n];
            for(int i = 0; i < n; i++){
                arr[i] = in.readLong();
            }
            int max = 0;
            long sumT = arr[0];
            int from = 0, to = 0;
            while(to < n){
                if(sumT <= t){
                    to++;
                    max = max(max, to - from);
                    if(to < n){
                        sumT += arr[to];
                    }
                }else{
                    sumT -= arr[from];
                    from++;
                }
            }
            out.println(max);
        }
    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer str;

        public InputReader(InputStream inStream) throws IOException{
            reader = new BufferedReader(new InputStreamReader(inStream));
            str = new StringTokenizer(reader.readLine());
        }

        void refillStr()throws IOException{
            if(str.countTokens() == 0){
                str = new StringTokenizer(reader.readLine());
            }
        }

        String readString()throws IOException{
            refillStr();
            return str.nextToken();
        }

        int readInt()throws IOException{
            refillStr();
            return Integer.parseInt(str.nextToken());
        }

        long readLong()throws IOException{
            refillStr();
            return Long.parseLong(str.nextToken());
        }

        double readDouble()throws IOException{
            refillStr();
            return Double.parseDouble(str.nextToken());
        }

        String readLine()throws IOException{
            return reader.readLine();
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object...objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void println(Object...objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }

}


import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.InputStream;
import static java.lang.Math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException{
        Task solver = new Task();
        solver.solve();
    }

    static class Task {
        public void solve() throws IOException{
            BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
            StringTokenizer str = new StringTokenizer(r.readLine());

            int n = Integer.parseInt(str.nextToken());
            long t = Long.parseLong(str.nextToken());
            long[] arr = new long[n];
            str = new StringTokenizer(r.readLine());
            for(int i = 0; i < n; i++){
                arr[i] = Long.parseLong(str.nextToken());
            }

            int max = 0;
            long sumT = arr[0];
            int from = 0, to = 0;
            while(to < n){
                if(sumT <= t){
                    to++;
                    max = max(max, to - from);
                    if(to < n){
                        sumT += arr[to];
                    }
                }else{
                    sumT -= arr[from];
                    from++;
                }
            }
            System.out.println(max);
        }
    }
}


import java.util.*;

public class Books279B
{
    public static void main(String[] args)
    {
        // Set up scanner
        Scanner sc = new Scanner(System.in);
        // System.out.println("Enter n");
        int n = sc.nextInt();
        // System.out.println("Enter t");
        int t = sc.nextInt();

        int[]a = new int[n];

        for (int i=0; i<n; i++)
        {
            // System.out.println("Enter time for next book");
            int x = sc.nextInt();
            a[i] = x;
        }

        int maxbooks = 0;
        for (int i=0; i<n; i++)
        {
            int timetaken = 0;
            int booksread = 0;
            for (int j=i; j<n; j++)
            {
                if (timetaken + a[j] <= t)
                {
                    timetaken += a[j];
                    booksread++;
                    if (booksread > maxbooks)
                    {
                        maxbooks = booksread;
                    }
                }
                else
                {
                    break;
                }
            }
        }

        System.out.println(maxbooks);
    }
}


import java.util.*;
import java.io.*;

public class Books279B
{
    private static class MyFasterScanner {
    BufferedReader br;
    StringTokenizer st;

    public MyFasterScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine(){
        String str="";
        try {
            str =  br.readLine().toString();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }

}
    public static void main(String[] args)
    {
        // Set up scanner
        MyFasterScanner sc = new MyFasterScanner();
        // System.out.println("Enter n");
        int n = sc.nextInt();
        // System.out.println("Enter t");
        int t = sc.nextInt();

        int[]a = new int[n];
        int answer = 0;
        int gi = 0;

        for (int ci=0; ci<n; ci++)
        {
            // System.out.println("Enter time for next book");
            int x = sc.nextInt();
            for (int i=gi; i<=ci; i++)
            {
                if (a[i] + x <= t)
                {
                    a[i] += x;
                }
                else
                {
                    int tryit = ci - gi;
                    if (tryit > answer)
                    {
                        answer = tryit;
                    }
                    gi++;
                }
            }
        }

        System.out.println(Math.max(answer, n-gi));
    }
}


import java.util.*;

public class Books279B
{
    public static void main(String[] args)
    {
        // Set up scanner
        Scanner sc = new Scanner(System.in);
        // System.out.println("Enter n");
        int n = sc.nextInt();
        // System.out.println("Enter t");
        int t = sc.nextInt();

        int[]a = new int[n];
        int answer = 0;
        int gi = 0;

        for (int ci=0; ci<n; ci++)
        {
            // System.out.println("Enter time for next book");
            int x = sc.nextInt();
            for (int i=gi; i<=ci; i++)
            {
                if (a[i] + x <= t)
                {
                    a[i] += x;
                }
                else
                {
                    int tryit = ci - gi;
                    if (tryit > answer)
                    {
                        answer = tryit;
                    }
                    gi++;
                }
            }
        }

        System.out.println(Math.max(answer, n-gi));
    }
}


import java.util.*;

public class Books279B
{
    public static void main(String[] args)
    {
        // Set up scanner
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter n");
        int n = sc.nextInt();
        System.out.println("Enter t");
        int t = sc.nextInt();

        int[]a = new int[n];

        for (int i=0; i<n; i++)
        {
            System.out.println("Enter time for next book");
            int x = sc.nextInt();
            a[i] = x;
        }

        int maxbooks = 0;
        for (int i=0; i<n; i++)
        {
            int timetaken = 0;
            int booksread = 0;
            for (int j=i; j<n; j++)
            {
                if (timetaken + a[j] <= t)
                {
                    timetaken += a[j];
                    booksread++;
                    if (booksread > maxbooks)
                    {
                        maxbooks = booksread;
                    }
                }
                else
                {
                    break;
                }
            }
        }

        System.out.println(maxbooks);
    }
}


import java.util.*;
import java.io.*;

public class Books279B
{
    private static class MyFasterScanner {
    BufferedReader br;
    StringTokenizer st;

    public MyFasterScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine(){
        String str="";
        try {
            str =  br.readLine().toString();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }

}
    public static void main(String[] args)
    {
        // Set up scanner
        MyFasterScanner sc = new MyFasterScanner();
        // System.out.println("Enter n");
        int n = sc.nextInt();
        // System.out.println("Enter t");
        int t = sc.nextInt();

        int[]a = new int[n+1];
        a[0] = 0;
        int answer = 0;
        int goodi = 0;

        for (int currenti=1; currenti<=n; currenti++)
        {
            // System.out.println("Enter time for next book");
            int x = sc.nextInt();
            a[currenti] = a[currenti-1] + x;   // Keep running sum
            if (a[currenti] - a[goodi] <= t)    // Still a good run
            {
                if (currenti - goodi > answer)
                {
                    answer = currenti - goodi;
                }

            }
            else     // Reset
            {
                while (a[currenti] - a[goodi] > t)
                {
                    goodi++;
                }
                if (currenti - goodi > answer)
                {
                    answer = currenti - goodi;
                }
            }
        }
        System.out.println(answer);
    }
}


import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;

public class B {

	int INF = 1 << 28;
	//long INF = 1L << 62;
	double EPS = 1e-10;

	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), t = sc.nextInt();
		int[] b = new int[n];
		for(int i=0;i<n;i++) b[i] = sc.nextInt();
		int max = 0, sum = 0;
		for(int i=0,j=0;i<n;sum -= b[i], i++) {
			for(;j<n && sum + b[j] <= t ;j++) sum += b[j];
			max = max(max, j - i);
		}
		System.out.println(max);
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}

	public static void main(String[] args) {
		new B().run();
	}
}


import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;

public class B {

	int INF = 1 << 28;
	//long INF = 1L << 62;
	double EPS = 1e-10;

	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(); long t = sc.nextLong();
		long[] b = new long[n];
		for(int i=0;i<n;i++) b[i] = sc.nextLong();
		sort(b);
		int cnt = 0;
		for(;cnt<n;cnt++) {
			t -= b[cnt];
			if(t<0) break;
		}
		System.out.println(cnt);
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}

	public static void main(String[] args) {
		new B().run();
	}
}


import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;

public class B {

	int INF = 1 << 28;
	//long INF = 1L << 62;
	double EPS = 1e-10;

	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), t = sc.nextInt();
		int[] b = new int[n];
		for(int i=0;i<n;i++) b[i] = sc.nextInt();
		int max = 0, sum = 0;
		for(int i=0,j=0;i<n;sum -= b[i], i++) {
			for(;j<n && sum + b[j] < t ;j++) sum += b[j];
			max = max(max, j - i);
		}
		System.out.println(max);
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}

	public static void main(String[] args) {
		new B().run();
	}
}


import java.util.Scanner;

public class Books {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int nrOfBooks = in.nextInt();
        int time = in.nextInt();

        int[] prefix = new int[nrOfBooks + 1];
        for (int i = 1; i <= nrOfBooks; i++){
            prefix[i] = in.nextInt();
        }
        for (int i = 2; i <= nrOfBooks; i++){
            prefix[i] = prefix[i] + prefix[i - 1];
        }
        prefix[0] = 0;
        int maksNrOfBooks = 0;
        int i = 0;
        int j = 1;
        while (j <= nrOfBooks){
            if ((prefix[j] - prefix[i]) <= time){
                if ((j - i) > maksNrOfBooks)
                    maksNrOfBooks = j - i;
                j = j + 1;
            } else {
                i = i + 1;
            }
        }
        System.out.println(maksNrOfBooks);
    }

}


import java.util.*;
import java.io.*;
import java.math.*;
public class Main{ //имя класса должно быть Main
  public static void main(String[] argv) throws IOException{
    new Main().run();
  }

  public void run() throws IOException {
      //Scanner sc = new Scanner(new File("input.txt"));
     // PrintWriter pw = new PrintWriter(new File("output.txt"));
      Scanner sc = new Scanner(System.in);
      PrintWriter pw = new PrintWriter(System.out);
      int n=sc.nextInt();
      int t=sc.nextInt();
      int [] p=new int [n+1];
      for (int i=0;i<n;i++){
          p[i]=sc.nextInt();
      }
      int uk=0;
      int sum=0;
      int kol=0;

      int max=0;
      for (int i=0;i<n;i++){

           // pw.print(kol);
          if (sum+p[i] >= t) {
              if (kol> max){
                  max=kol;
              }

              sum=sum+p[i];
              kol++;
              while (sum >t){

                  sum-=p[uk];
                  kol--;
                  uk++;
              }

          } else{
              sum+=p[i];
              kol++;
          }
          if (sum<=t){
              if (kol> max){
                  max=kol;
              }
          }

      }
    pw.print(max);
  pw.close();
  }
}


import java.util.Scanner;

public class Books {

   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int cantidadDeLibros = sc.nextInt();
      int tiempoDisponible = sc.nextInt();
      int[] tiempoXLibro = new int[cantidadDeLibros];

      for (int i = 0; i < tiempoXLibro.length; i++) {
         tiempoXLibro[i] = sc.nextInt();
      }

      sc.close();

      int sumaTiempos = 0;
      int desde = 0;
      int hasta = 0;

      while (hasta < cantidadDeLibros){
         if (sumaTiempos + tiempoXLibro[hasta] > tiempoDisponible){
            sumaTiempos -= tiempoXLibro[desde];
            desde++;
         }
         sumaTiempos += tiempoXLibro[hasta];
         hasta++;
      }

      System.out.println(hasta - desde);
   }

}


import java.io.*;
import java.util.*;

public class ProblemB {
    InputReader in; PrintWriter out;
    void solve() {
        int n = in.nextInt();
        int t = in.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        int i = 0;
        int j = 0;
        int s = 0;
        int ans = -1;
        while (i < n) {
            while (j < n && s + a[j] <= t) {
                s = s + a[j];
                j++;
            }
            if (j - i > ans)
                ans = j - i;
            s -= a[i];
            i++;
        }
        out.println(ans);
    }

    ProblemB(){
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        try {
            if (oj) {
                in = new InputReader(System.in);
                out = new PrintWriter(System.out);
            }
            else {
                Writer w = new FileWriter("output.txt");
                in = new InputReader(new FileReader("input.txt"));
                out = new PrintWriter(w);
            }
        } catch(Exception e) {
            throw new RuntimeException(e);
        }
        solve();
        out.close();
    }
    public static void main(String[] args){
        new ProblemB();
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public InputReader(FileReader fr) {
        reader = new BufferedReader(fr);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }
    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong() {
        return Long.parseLong(next());
    }
    public double nextDouble() {
        return Double.parseDouble(next());
    }

}


import java.io.*;
import java.util.*;
public class Main {
  static Scanner sc;
  static PrintWriter pw;
  public static int n;
  public static int a[][];
  public static boolean used[];
  public static int maxi(int x,int y)
  {
	  if (x>y)
	  return x; else return y;
  }
public static void dfs(int k)
{   used[k] = true;
	for (int i=0;i<n;i++)
	{
	   if ((a[k][i]==1)&&(!used[i])) dfs(i);
	}
}
  public static void main(String [] atgv)
  {
	  sc=new Scanner(System.in);
	  pw=new PrintWriter(System.out);
     int n = sc.nextInt();
     int m = sc.nextInt();
     int a[] = new int [n];
     long b[] = new long [n+1];

     for (int i=0;i<n;i++)
     {
    	 a[i] = sc.nextInt();
         b[i] = a[i];
     }
     b[n]=0;
     for (int i=n-2;i>=0;i--)
    	 b[i] += b[i+1];
     int max = 0;
     int pointer = 0;
     for (int i=0;i<n;i++)
     {
    	 while ((pointer<=n)&&  (b[i]-b[pointer]<=m)  )
           pointer++;

    	 max = maxi(max,pointer-i-1);

     }
     pw.println(max);
     pw.close();
  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class B {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken()), t = Integer.parseInt(st
                .nextToken());

        int[] nums = new int[n];
        st = new StringTokenizer(br.readLine());
        for (int i = 0; i < n; i++)
            nums[i] = Integer.parseInt(st.nextToken());

        int curr = 0, cnt = 0, start = 0, max = 0;
        for (int i = 0; i < n; i++) {
            curr += nums[i];
            cnt++;
            while (curr > t) {
                curr -= nums[start++];
                cnt--;
            }
            max = Math.max(max, cnt);
        }

        System.out.println(max);
    }
}


#include <iostream>
using namespace std;

int main() {

int n,max;
cin>>n>>max;
int a[n];
for(int i=0;i<n;i++)
cin>>a[i];
int start,end,count,s,maxsum,currsum;
start=end=count=s=maxsum=currsum=0;
for(int i=0;i<n;i++)
{
    currsum+=a[i];
    if(currsum<max)
    {
        start=s;
        end=i;
        int temp=end-start+1;
        if(temp>count)
        {
            count=temp;
        }
    }
    if(currsum>max)
    {
        currsum-=a[s];
        s=s+1;
    }
}

cout<<count<<endl;
	return 0;
}


#include <iostream>
using namespace std;

int main() {

int n,max;
cin>>n>>max;
int a[n];
for(int i=0;i<n;i++)
cin>>a[i];
int start,end,count,s,maxsum,currsum;
start=end=count=s=maxsum=currsum=0;
for(int i=0;i<n;i++)
{
    currsum+=a[i];
    if(currsum<max)
    {
        start=s;
        end=i;
        int temp=end-start;
        if(temp>count)
        {
            count=temp;
        }
    }
    if(currsum>max)
    {
        currsum-=a[s];
        s=s+1;
    }
}

cout<<"max no of book   "<<count<<endl;
	return 0;
}


#include <iostream>
using namespace std;

int main() {

int n,max;
cin>>n>>max;
int a[n];
for(int i=0;i<n;i++)
cin>>a[i];
int start,end,count,s,maxsum,currsum;
start=end=count=s=maxsum=currsum=0;
for(int i=0;i<n;i++)
{
    currsum+=a[i];
    if(currsum<=max)
    {
        start=s;
        end=i;
        int temp=end-start+1;
        if(temp>count)
        {
            count=temp;
        }
    }
    if(currsum>max)
    {
        currsum-=a[s];
        s=s+1;
    }
}

cout<<count<<endl;
	return 0;
}


#include <iostream>
#include <stdio.h>

int v[100000];

int main() {
    int n, t, max, j, i, sc;
    scanf( "%d%d", &n, &t );
    j = max = sc = 0;
    for( i = 0; i < n; i++ ) {
        scanf( "%d", &v[i] );
        sc += v[i];
        while( j <= i && sc > t ) {
            sc -= v[j];
            j++;
        }
        if( max < i - j + 1 ) {
            max = i - j + 1;
        }
    }
    printf( "%d", max );
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <map>
#include <vector>
#include <algorithm>
#include <map>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    int n, t;
    scanf("%d%d", &n, &t);
	vector<int> a(n);
    while (n) {
		scanf("%d", &a[a.size() - n--]);
    }
    auto l = a.begin(), r = a.begin();
    int tmp = 0, res = 0;
    while (r != a.end()) {
        if (r == l) {
            if (*l > t) {
                ++r;
                ++l;
            } else {
                ++r;
                t -= *l;
                ++tmp;
                res = max(res, tmp);
            }
            continue;
        }
        if (*r <= t) {
            ++tmp;
            t -= *r;
            ++r;
            res = max(res, tmp);
        } else {
            t += *l;
            ++l;
            --tmp;
        }
    }
    printf("%d", res);
}


print(function(n, t) {
	var s = 0;
	var a = readline().split(' ').map(Number);
	var b = Int32Array(n + 1);
	var ans = 0;
	for (var i = 0; i < n; i++)
		b[i + 1] = b[i] + a[i];

	for (var i = 1; i <= n; i++) {
		var x = find(b[i] - t);
		if (x > -1) {
			ans = Math.max(ans, i - x);
		}
	}

	return ans;

	function find(v) {
		var mid, low = 0,
			high = n;
		if (v < b[low]) return -1;
		if (v > b[high]) return -1;
		if (v == b[high]) return n;
		while (low < high) {
			mid = ~~ ((low + high) / 2);
			if (v >= b[mid]) {
				if (v < b[mid + 1]) return mid + 1;
				low = mid;
			} else {
				if (v >= b[mid - 1]) return mid;
				high = mid;
			}
		}
	}

}.apply(0, readline().split(' ').map(Number)));


print(function(n, t) {
	var a = rn(),
		l = 0,
		r = 0,
		sum = 0,
		ans = 0;
	while (r < n) {
		sum += a[r++];
		while (sum > t)
			sum -= a[l++];
		if (r - l > ans)
			ans = r - l;
	}
	return ans;
}.apply(0, rn()));

function rn() {
	return readline().split(' ').map(Number);
}


var l=readline().split(' ');
var n=+l[0];
var t=+l[1];
var a=readline().split(' ')
	.map(function(v){return+v;})
	.sort(function(a,b){return a-b});
var ans=0;
var sum=0;
for(var i=0;i<n;i++){
	sum+=a[i];
	if(sum>t){
		break;
	}else{
		ans++;
	}
}
print(ans);


print(function(n, t) {
	var s = 0;
	var a = readline().split(' ').map(Number);
	var b = new Int32Array(n + 1);
	var ans = 0;
	for (var i = 0; i < n; i++)
		b[i + 1] = b[i] + a[i];

	for (var i = 1; i <= n; i++) {
		var x = find(b[i] - t);
		if (x > -1) {
			ans = Math.max(ans, i - x);
		}
	}

	return ans;

	function find(v) {
		var mid, low = 0,
			high = n;
		if (v <= b[low]) return low;
		if (v > b[high]) return -1;
		if (v == b[high]) return n;
		while (low < high) {
			mid = ~~ ((low + high) / 2);
			if (v >= b[mid]) {
				if (v < b[mid + 1]) return mid + 1;
				low = mid;
			} else {
				if (v >= b[mid - 1]) return mid;
				high = mid;
			}
		}
	}

}.apply(0, readline().split(' ').map(Number)));


print(function(n, t) {
	var a = rn(),
		l = 0,
		r = 0,
		sum = 0,
		ans = 0;
	while (r < n) {
		sum += a[r++];
		while (sum > t)
			sum -= a[l++];
		ans = Math.max(r - l, ans);
	}
	return ans;
}.apply(0, rn()));

function rn() {
	return readline().split(' ').map(Number);
}


print(function(n, t) {
	var s = 0;
	var a = readline().split(' ').map(Number);
	var b = new Int32Array(n + 1);
	var ans = 0;
	for (var i = 0; i < n; i++)
		b[i + 1] = b[i] + a[i];

	for (var i = 1; i <= n; i++) {
		var x = findCeil(b, b[i] - t, 0, n);
		if (x > -1) {
			ans = Math.max(ans, i - x);
		}
	}

	return ans;

}.apply(0, readline().split(' ').map(Number)));

function findCeil(a, v, l, h) {
	var m;
	if (v <= a[l]) return l;
	if (v > a[h]) return -1;
	while (l <= h) {
		m = l + h >> 1;
		if (v <= a[m]) {
			if (v > a[m - 1]) return m;
			else h = m - 1;
		} else {
			if (v <= a[m + 1]) return m + 1;
			else l = m + 1;
		}
	}
	return -1;
}


print(function(n, t) {
	var s = 0;
	var a = readline().split(' ').map(Number);
	var b = new Int32Array(n + 1);
	var ans = 0;
	for (var i = 0; i < n; i++)
		b[i + 1] = b[i] + a[i];

	for (var i = 1; i <= n; i++) {
		var x = find(b[i] - t);
		if (x > -1) {
			ans = Math.max(ans, i - x);
		}
	}

	return ans;

	function find(v) {
		var mid, low = 0,
			high = n;
		if (v < b[low]) return -1;
		if (v > b[high]) return -1;
		if (v == b[high]) return n;
		while (low < high) {
			mid = ~~ ((low + high) / 2);
			if (v >= b[mid]) {
				if (v < b[mid + 1]) return mid + 1;
				low = mid;
			} else {
				if (v >= b[mid - 1]) return mid;
				high = mid;
			}
		}
	}

}.apply(0, readline().split(' ').map(Number)));


function rda(){ return readline().split(" ").map(Number); }
function rdn(){ return Number(readline()); }

var a = rda(), n = a[0], t = a[1];
a = rda();

for(var i = 0, s = 0; i < n; i++){
    s += a[i];
    a[i] = s;
}

var ans = 0;
if(t >= a[0]) ans++;

for(var i = 0, j = 1; j < n; ){
    var x = (i == 0) ? (a[j]) : (a[j]-a[i-1]);
    if(x <= t){
        j++;
        ans++;
    }else{
        i++;
        j++;
    }
}

write(ans);


function rda(){ return readline().split(" ").map(Number); }
function rdn(){ return Number(readline()); }

var a = rda(), n = a[0], t = a[1];
a = rda();

for(var i = 0, s = 0; i < n; i++){
    s += a[i];
    a[i] = s;
}

var ans = 0;

for(var i = 0, j = 0; j < n; ){
    var x = (i == 0) ? (a[j]) : (a[j]-a[i-1]);
    if(x <= t){
        j++;
        ans++;
    }else{
        i++;
        j++;
    }
}

write(ans);


function rda(){ return readline().split(" ").map(Number); }
function rdn(){ return Number(readline()); }

var a = rda(), n = a[0], t = a[1];
a = rda().sort(function(x, y){ return x-y; });

for(var i = 0, s = 0; i < n; i++){
    s += a[i];
    a[i] = s;
}

var ans = 0;
if(t >= a[0]) ans++;

for(var i = 0, j = 1; j < n; ){
    if(a[j] <= t){
        j++;
        ans++;
    }else{
        i++;
        j++;
    }
}

write(ans);


var input = readline().split(" ").map(Number), n = input[0], t = input[1], a = readline().split(" ").map(Number);
var max = -Infinity, counter;

for(var i = 0; i < n; i++){
	counter = 0;
	for(var j = i; j < n; j++){
		counter += a[j];
		if(counter > t){
			max = Math.max(max, (j - i));
			break;
		}
		if(counter <= t && j == n-1){
			max = Math.max(max, (j - i + 1));
		}
	}
}

write(max);


function rda(){ return readline().split(" ").map(Number); }
function rdn(){ return Number(readline()); }

var a = rda(), n = a[0], t = a[1];
a = rda();

for(var i = 0, s = 0; i < n; i++){
    s += a[i];
    a[i] = s;
}

var ans = 0;
if(t >= a[0]) ans++;

for(var i = 0, j = 1; j < n; ){
    var x = (i == 0) ? (a[j]) : (a[j]-a[i-1]);
    if(x <= t){
        j++;
        ans++;
    }else{
        i++;
        j++;
    }
    print(i, j, ans);
}

write(ans);


var input = readline().split(" ").map(Number), n = input[0], t = input[1], a = readline().split(" ").map(Number);
var i, j, cnt = 0, ans = -Infinity;

for(i = 0, j = i; i < n; ){
	if(j == n){
		if(i == j){
			ans = Math.max(ans, 1);
		}
		ans = Math.max(ans, (j - i));
		break;
	}
	cnt += a[j];
	if(cnt > t){
		ans = Math.max(ans, (j - i));
		i++;
		j = i;
		cnt = 0;
	}
	else if(cnt <= t){
		j++;
	}
}

write(ans);


var input = readline().split(" ").map(Number), n = input[0], t = input[1], a = readline().split(" ").map(Number);
var counter = 0, ans;

a = a.filter(function(number){
	return !(number > t);
});
n = a.length;

a.sort(function(x,y){return x-y});

if(n == 0){
	ans = n;
}
else{
	for(var i = 0; i < n; i++){
		counter += a[i];
		if(counter > t){
			ans = i;
			break;
		}
	}

	if(counter <= t){
		ans = n;
	}

}

write(ans);


(function main() {
    var toInt = function(x) {
        return parseInt(x);
    }
    // ar = [2, 10];
    // t = 10;
    var firstline = readline().split(" ").map(toInt);
    var n = firstline[0],
        t = firstline[1];

    var ar = readline().split(" ").map(toInt);
    ar.sort(function(a, b){return a-b});

    ar.reduce(function(sum, next, id, array) {
        var tmp = sum + next;
        array[id] = tmp;
        return tmp;
    });

    print((function() {
        var left = 0,
            right = ar.length-1;
        var mid, old_mid= -1;
        while (left <= right) {
            mid = Math.floor((left + right) / 2);
            if (ar[mid] < t) {
                if (old_mid == mid) {
                    if (ar[old_mid + 1] < t)
                        return old_mid + 1;
                    return mid;
                }
                left = mid;
            } else if (ar[mid] == t) {
                return mid;
            } else {
                right = mid - 1;
            }
            old_mid = mid;
        }
        return -1;
    })()+1);
})();


(function main() {
    var toInt = function(x) {
        return parseInt(x);
    }
    var firstline = readline().split(" ").map(toInt);
    var n = firstline[0],
        t = firstline[1];

    var ar = readline().split(" ").map(toInt);
    ar.sort();

    ar.reduce(function(sum, next, id, array) {
        var tmp = sum + next;
        array[id] = tmp;
        return tmp;
    });

    print((function() {
        var left = 0,
            right = ar.length-1;
        var mid, old_mid= -1;
        while (left <= right) {
            mid = Math.floor((left + right) / 2);
            if (ar[mid] < t) {
                if (old_mid == mid) {
                    if (ar[old_mid + 1] < t)
                        return old_mid + 1;
                    return mid;
                }
                left = mid;
            } else if (ar[mid] == t) {
                return mid;
            } else {
                right = mid - 1;
            }
            old_mid = mid;
        }
        return -1;
    })()+1);
})();


(function main() {
    var toInt = function(x) {
        return parseInt(x);
    }
    var firstline = readline().split(" ").map(toInt);
    var n = firstline[0],
        t = firstline[1];

    var ar = readline().split(" ").map(toInt);

    ar.sort();

    ar.reduce(function(sum, next, id, array) {
        var tmp = sum + next;
        array[id] = tmp;
        return tmp;
    });

    print((function() {
        var left = 0,
            right = ar.length-1;
        var mid, old_mid= -1;
        while (left <= right) {
            mid = (left + right) / 2;
            if (ar[mid] < t) {
                if (old_mid == mid) {
                    if (ar[old_mid + 1] < t)
                        return old_mid + 1;
                    return mid;
                }
                left = mid;
            } else if (ar[mid] == t) {
                return mid;
            } else {
                right = mid - 1;
            }
            old_mid = mid;
        }
    })());
})();


(function main() {
    var toInt = function(x) {
        return parseInt(x);
    }
    var firstline = readline().split(" ").map(toInt);
    var n = firstline[0],
        t = firstline[1];

    var ar = readline().split(" ").map(toInt);

    ar.sort();

    ar.reduce(function(sum, next, id, array) {
        var tmp = sum + next;
        array[id] = tmp;
        return tmp;
    });

    print((function() {
        var left = 0,
            right = ar.length;
        var mid = (left + right) / 2,
            old_mid;
        while (left <= right) {
            if (ar[mid] < t) {
                if (old_mid == mid) {
                    if (ar[old_mid + 1] < t)
                        return ar[old_mid + 1];
                    return ar[mid];
                }
                left = mid;
            } else if (ar[mid] == t) {
                return ar[mid];
            } else {
                right = mid - 1;
            }
            old_mid = mid;
        }
    })());
})();


(function main() {
    var toInt = function(x) {
        return parseInt(x);
    }
    var firstline = readline().split(" ").map(toInt);
    var n = firstline[0],
        t = firstline[1];

    var ar = readline().split(" ").map(toInt);
    ar.sort();

    ar.reduce(function(sum, next, id, array) {
        var tmp = sum + next;
        array[id] = tmp;
        return tmp;
    });

    print((function() {
        var left = 0,
            right = ar.length-1;
        var mid, old_mid= -1;
        while (left <= right) {
            mid = Math.floor((left + right) / 2);
            if (ar[mid] < t) {
                if (old_mid == mid) {
                    if (ar[old_mid + 1] < t)
                        return old_mid + 1;
                    return mid;
                }
                left = mid;
            } else if (ar[mid] == t) {
                return mid;
            } else {
                right = mid - 1;
            }
            old_mid = mid;
        }
        return left;
    })()+1);
})();


(function main() {
    var toInt = function(x) {
        return parseInt(x);
    }
    // ar = [6, 4];
    // t = 10;
    var firstline = readline().split(" ").map(toInt);
    var n = firstline[0],
        t = firstline[1];

    var ar = readline().split(" ").map(toInt);
    ar.sort(function(a, b){return a-b});

    ar.reduce(function(sum, next, id, array) {
        var tmp = sum + next;
        array[id] = tmp;
        return tmp;
    });

    print((function() {
        var left = 0,
            right = ar.length-1;
        var mid, old_mid= -1;
        while (left <= right) {
            mid = Math.floor((left + right) / 2);
            if (ar[mid] < t) {
                if (old_mid == mid) {
                    if (ar[old_mid + 1] <= t)
                        return old_mid + 1;
                    return mid;
                }
                left = mid;
            } else if (ar[mid] == t) {
                return mid;
            } else {
                right = mid - 1;
            }
            old_mid = mid;
        }
        return -1;
    })()+1);
})();


(function main() {
    var toInt = function(x) {
        return parseInt(x);
    }
    // ar = [6, 4];
    // t = 10;
    var firstline = readline().split(" ").map(toInt);
    var n = firstline[0],
        t = firstline[1];

    var ar = readline().split(" ").map(toInt);
    ar.sort(function(a, b){return a-b});

    ar.reduce(function(sum, next, id, array) {
        var tmp = sum + next;
        array[id] = tmp;
        return tmp;
    });

    print((function() {
        var left = 0,
            right = ar.length-1;
        var mid, old_mid= -1;
        while (left <= right) {
            mid = Math.floor((left + right) / 2);
            console.log(left, right, mid);
            if (ar[mid] < t) {
                if (old_mid == mid) {
                    if (ar[old_mid + 1] <= t)
                        return old_mid + 1;
                    return mid;
                }
                left = mid;
            } else if (ar[mid] == t) {
                return mid;
            } else {
                right = mid - 1;
            }
            old_mid = mid;
        }
        return -1;
    })()+1);
})();


(function main() {
    var toInt = function(x) {
        return parseInt(x);
    }
    var firstline = readline().split(" ").map(toInt);
    var n = firstline[0],
        t = firstline[1];

    var ar = readline().split(" ").map(toInt);
    // NOT ar.sort(function(a, b){return a-b});

    ar.reduce(function(sum, next, id, array) {
        var tmp = sum + next;
        array[id] = tmp;
        return tmp;
    });

    ar.splice(0,0,0);

    print((function() {
        function binarysearch(end) {
            var left = 0,
            right = end;
            var mid;
            while (left <= right) {
                mid = Math.floor((left + right) /2);
                var sub = ar[end] - ar[mid];

                if (sub == t) {
                    return end - mid;
                } else if (sub > t) {
                    left = mid + 1;
                } else {
                    right = mid;
                    if (left == right) {
                        return end - mid;
                    }
                }
            }
        }
        var count = -1;
        for(var i = 1; i < ar.length; ++i) {
            var tmp = binarysearch(i);
            if (count < tmp)
                count = tmp;
        }
        if (count > -1)
            return count;
        return 0;
    })());
})();


var line = readline().split(' ');

var n = parseInt(line[0]);
var t = parseInt(line[1]);

var books = readline().split(' ');

var max = 0;
books[-1] = 0;
var j = -1;
var total = 0;
for(var i = 0; i < n; i++ ) {
    if(j == n){
        break;
    }
    if(i == j) {
        i++;
    }
    if(parseInt(books[i]) + total <= t){
        if(i - j  > max){
            max = i - j ;
        }
        total +=parseInt(books[i]);
    } else {
        if(total != 0){
            total -= parseInt(books[j-1]);
        }
        j++;
        i--;
    }
}

print(max);


var line = readline().split(' ');

var n = parseInt(line[0]);
var t = parseInt(line[1]);

var books = readline().split(' ');

var max = 0;
books[-1] = 0;
var j = -1;
var total = 0;
for(var i = 0; i < n; i++ ) {
    if(j == n){
        break;
    }
    if(i == j) {
        i++;
    }
    if(parseInt(books[i]) + total <= t){
        if(i - j  > max){
            max = i - j ;
        }
        total +=parseInt(books[i]);
    } else {
        total -= parseInt(books[j]);
        j++;
        i--;
    }
}

print(max);


var line = readline().split(' ');

var n = parseInt(line[0]);
var t = parseInt(line[1]);

var books = readline().split(' ');

var times = {};

times[0] = 0;

for(var i = 0; i < n; i++ ){
    times[i+1] = times[i] + parseInt(books[i]);
}

var max = 0;
for(var i = 0; i < n; i++) {
    for(var j=n-1; j < n; j--){
        if(times[j]  - times[i] <= t && j - i + 1 > max){
            max = j - i + 1;
        }
    }
}

print(max);


var line = readline().split(' ');

var n = parseInt(line[0]);
var t = parseInt(line[1]);

var books = readline().split(' ');

var max = 0;
books[-1] = 0;
var j = -1;
var total = 0;
for(var i = 0; i < n; i++ ) {
    if(j == n){
        break;
    }
    if(i == j) {
        i++;
    }
    if(parseInt(books[i]) + total <= t){
        if(i - j  > max){
            max = i - j ;
        }
        total +=parseInt(books[i]);
    } else {
        if(total != 0){
            total -= parseInt(books[j+1]);
        }
        j++;
        i--;
    }
}

print(max);


var line = readline().split(' ');

var n = parseInt(line[0]);
var t = parseInt(line[1]);

var books = readline().split(' ');

var times = {};

times[0] = 0;

for(var i = 0; i < n; i++ ){
    times[i+1] = times[i] + parseInt(books[i]);
}

var max = 0;
for(var i = 0; i < n; i++) {
    for(var j=n; j > 0; j--){
        if(times[j]  - times[i] <= t && j - i > max){
            max = j - i;
        }
    }
}

print(max);


var line = readline().split(' ');

var n = parseInt(line[0]);
var t = parseInt(line[1]);

var books = readline().split(' ');

var times = {};

times[0] = 0;

for(var i = 0; i < n; i++ ){
    times[i+1] = times[i] + parseInt(books[i]);
}

var max = 0;
for(var i = 0; i < n; i++) {
    for(var j=n-1; j > 0; j--){
        if(times[j]  - times[i] <= t && j - i + 1 > max){
            max = j - i + 1;
        }
    }
}

print(max);


;(function () {

	print(function(n, t) {
		var a = readline().split(' ').map(Number), ret = 0;

		for (var i = 0, j = 0, s = 0; i < n; i++) {
			s += a[i];
			while (s > t) s -= a[j++];
			ret = Math.max(ret, i - j + 1);
		}

		return ret;
	}.apply(null, readline().split(' ').map(Number)));

}).call(this);


;(function () {

	print((function (n, t) {
		var a = readline().split(' ').map(Number), ret = 0;

		for (var i = 0; i < n; i++) {
			var time = 0, books = 0, j = i;

			do {

				if (j >= n) break;
				time += a[j++];

				if (time > t) break;
				books++;

			} while (true);

			ret = Math.max(ret, books);
		}

		return ret;

	}).apply(this, readline().split(' ').map(Number)));

}).call(this);


function main() {
    var line = readline().split(' ').map(Number);
    var n = line[0];
    var t = line[1];
    var time = t;
    var data = readline().split(' ').map(Number);
    var start = 0;
    var i=0;
    var max = 0;
    var res = 0;
    while(i < n){
        while(t - data[i] < 0 && data[i] <= time){
            t += data[start];
            res--;
            start++;
        }
        if(data[i] <= time){
        t-=data[i];
        res++;
        }
        if(res>max){
            max = res;
        }
        i++
    }
    print(max)
}

main()


function main() {
    var line = readline().split(' ').map(Number);
    var n = line[0];
    var t = line[1];
    var time = t;
    var data = readline().split(' ').map(Number);
    var start = 0;
    var i=0;
    var max = 0;
    var res = 0;
    while(i < n){
        while(t - data[i] < 0 && data[i] <= time){
            t += data[start];
            res--;
            start++;
        }
        t-=data[i];
        res++;
        if(res>max){
            max = res;
        }
        i++
    }
    print(max)
}

main()


#include<iostream>
using namespace std;
int64_t n,k,l,r,sall,sk,v,sum,sum1,a[10000009],m;
int main()
{
    cin>>n>>k>>l>>r>>sall>>sk;
    for(int i=1;i<=k;i++)
    {
        a[i]=sk/k;
        sum+=sk/k;
        sum1+=sk+k;
    }
    if(sum1>sk)
    {
        m=sum1=sk;
        for(int i=1;i<=m;i++)
        {
            a[i]--;
            sum--;
        }
    }
    for(int i=k+1;i<=n;i++)
    {
        a[i]=(sall-sk)/(n-k);
        sum+=(sall-sk)/(n-k);
    }
    if(sum<sall)
    {
        v=sall-sum;
        m=n/v;
        for(int i=1;i<=v;i++)
        {
            a[i]=a[i]+1;
            sum+=1;
        }
    }
    for(int i=1;i<=n;i++)
        cout<<a[i]<<" ";

}


#include<iostream>
using namespace std;
int64_t n,k,l,r,sall,sk,v,sum,sum1,a[10000009],m;
int main()
{
    cin>>n>>k>>l>>r>>sall>>sk;
    for(int i=1;i<=k;i++)
    {
        a[i]=sk/k;
        sum+=sk/k;
        sum1+=sk/k;
    }
    if(sum1>sk)
    {
        m=sum1-sk;
        for(int i=1;i<=m;i++)
        {
            a[i]--;
            sum--;
            sum1--;
        }
    }
    if(sum1<sk)
    {
        m=sk-sum1;
        for(int i=1;i<=m;i++)
        {
            a[i]++;
            sum++;
            sum1++;
        }

    }
    for(int i=k+1;i<=n;i++)
    {
        a[i]=(sall-sk)/(n-k);
        sum+=(sall-sk)/(n-k);
    }
    if(sum<sall)
    {
        v=sall-sum;
        m=n/v;
        for(int i=k+1;i<=k+v;i++)
        {
            a[i]++;
            sum++;
        }
    }
    for(int i=1;i<=n;i++)
        cout<<a[i]<<" ";
       //cout<<sum<<" "<<sum1;

}


#include<iostream>
using namespace std;
int64_t n,k,l,r,sall,sk,j=1,a[10000009];
int main()
{
    cin>>n>>k>>l>>r>>sall>>sk;
    sall=sall-sk;
    for(int i=r;i>=l;i--)
    {
        while(sk>=i)
        {
            if(sk-i<0)
            {
                i--;
                break;
            }
            if(sk-i>=0)
            {
                sk=sk-i;
                a[j]=i;
                j++;
            }
        }
        if(sk==0)
            break;
    }

    for(int i=r;i>=l;i--)
    {
        while(sall>=i)
        {
            if(sall-i<0)
            {
                i--;
                break;
            }
            if(sall-i>=0)
            {
                sall=sall-i;
                a[j]=i;
                j++;
            }
        }
        if(sall==0)
            break;
    }
    for(int i=1;i<j;i++)
        cout<<a[i]<<" ";
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;
    if(r == l){
       for(int i = 0; i < n; i++)
           printf("%d ", r);
       return 0;
    }
    int num = min(s2/k, r - l);
    if(num == r - l){
       for(int i = 0; i < k; i++)
           printf("%d ", r);
    }
    else{

         int diff1 = s2 - num*k;

         int mod = diff1%(r-l-num);

         for(int i = 0; i < diff1/(r-l-num); i++)
             printf("%d ", r);

         printf("%d ", num + mod + l);
         for(int i = diff1/(r-l-num) + 1; i < k; i++)
             printf("%d ", num + l);
    }
    int diff2 = num*(n-k) - s3, mod2 = diff2%(num);

    for(int i = 0; i < diff2/num && i < n - k; i++)
        printf("%d ", l);
    if(i == n - k)
       return 0;

    printf("%d ", num - mod2 + l);

    for(int i = diff2/num + 1; i < n - k; i++)
        printf("%d ", num + l);
    cout<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;
    if(r == l){
       for(int i = 0; i < n; i++)
           printf("%d ", r);
       return 0;
    }
    int num = min(s2/k, r - l);
    if(num == r - l){
       for(int i = 0; i < k; i++)
           printf("%d ", r);
    }
    else{

         int diff1 = s2 - num*k;

         int mod = diff1%(r-l-num);

         for(int i = 0; i < diff1/(r-l-num); i++)
             printf("%d ", r);
         printf("%d ", num + mod + l);
         for(int i = diff1/(r-l-num) + 1; i < k; i++)
             printf("%d ", num + l);
    }
    int diff2 = num*(n-k) - s3, mod2 = diff2%(num);

    if(n == 1000 && k == 999){
       cout<<diff2/num<<endl;
    }
    for(int i = 0; i < diff2/num; i++)
        printf("%d ", l);

    printf("%d ", num - mod2 + l);

    for(int i = diff2/num + 1; i < n - k; i++)
        printf("%d ", num + l);
    cout<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;

    int num = min(s2/k, r - l);

    int diff1 = s2 - num*k, diff2 = num*(n-k) - s3;
    int mod1 = diff1%k, mod2 = diff2%(n-k);
    for(int i = 0; i < diff1/k; i++)
        printf("%d ", r);
    printf("%d ", num + mod1 + l);
    for(int i = diff1/k + 1; i < k; i++)
        printf("%d ", num + l);

    for(int i = 0; i < diff2/(n-k); i++)
        printf("%d ", l);
    printf("%d ", num - mod2 + l);

    for(int i = diff2/(n-k) + 1; i < n - k; i++)
        printf("%d ", num + l);
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;
    if(r == l){
       for(int i = 0; i < n; i++)
           printf("%d ", r);
       return 0;
    }
    int num = min(s2/k, r - l);
    if(num == r - l){
       for(int i = 0; i < k; i++)
           printf("%d ", r);
    }
    else{

         int diff1 = s2 - num*k;

         int mod = diff1%(r-l-num);

         for(int i = 0; i < diff1/(r-l-num); i++)
             printf("%d ", r);
         printf("%d ", num + mod + l);
         for(int i = diff1/(r-l-num) + 1; i < k; i++)
             printf("%d ", num + l);
    }
    int diff2 = num*(n-k) - s3, mod2 = diff2%(num);

    if(n == 1000 && k == 999){
       cout<<diff2/num<<"O"<<endl;
    }
    for(int i = 0; i < diff2/num; i++)
        printf("%d ", l);

    printf("%d ", num - mod2 + l);

    for(int i = diff2/num + 1; i < n - k; i++)
        printf("%d ", num + l);
    cout<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;
    int num = min(r - l, s2/k);

    if(num == r - l){
       for(int i = 0; i < k; i++)
           printf("%d ", r);
    }
    else{

         int diff1 = s2 - num*k;

         int mod = diff1%(r-l-num);

         for(int i = 0; i < diff1/(r-l-num); i++)
             printf("%d ", r);

         printf("%d ", num + mod + l);

         for(int i = diff1/(r-l-num) + 1; i < k; i++)
             printf("%d ", num + l);

    }
    if(num == 0){
       for(int i = 0; i < n - k; i++)
           printf("%d ", l);
       return 0;
    }

    int diff2 = num*(n-k) - s3, mod2 = diff2%(num);
    int i;
    for(i = 0; i < diff2/num && i < n - k; i++)
        printf("%d ", l);
    if(i == n - k)
       return 0;

    printf("%d ", num - mod2 + l);

    for(i = diff2/num + 1; i < n - k; i++)
        printf("%d ", num + l);
    cout<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;
    if(r == l){
       for(int i = 0; i < n; i++)
           printf("%d ", r);
       return 0;
    }
    int num = min(s2/k, r - l);
    if(num == r - l){
       for(int i = 0; i < k; i++)
           printf("%d ", r);
    }
    else{

         int diff1 = s2 - num*k;
         cout<<"yes"<<endl;

         int mod = diff1%(r-l-num);

         for(int i = 0; i < diff1/(r-l-num); i++)
             printf("%d ", r);
         printf("%d ", num + mod + l);
         for(int i = diff1/(r-l-num) + 1; i < k; i++)
             printf("%d ", num + l);
    }
    int diff2 = num*(n-k) - s3, mod2 = diff2%(num);

    for(int i = 0; i < diff2/num && i < n - k; i++)
        printf("%d ", l);

    printf("%d ", num - mod2 + l);

    for(int i = diff2/num + 1; i < n - k; i++)
        printf("%d ", num + l);
    cout<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;
    if(r == l){
       for(int i = 0; i < n; i++)
           printf("%d ", r);
       return 0;
    }
    int num = min(s2/k, r - l);
    if(num == r - l){
       for(int i = 0; i < k; i++)
           printf("%d ", r);
    }
    else{

         int diff1 = s2 - num*k;

         int mod = diff1%(r-l-num);

         for(int i = 0; i < diff1/(r-l-num); i++)
             printf("%d ", r);
         printf("%d ", num + mod + l);
         for(int i = diff1/(r-l-num) + 1; i < k; i++)
             printf("%d ", num + l);
    }
    int diff2 = num*(n-k) - s3, mod2 = diff2%(num);

    for(int i = 0; i < diff2/num && i < n - k; i++)
        printf("%d ", l);

    printf("%d ", num - mod2 + l);

    for(int i = diff2/num + 1; i < n - k; i++)
        printf("%d ", num + l);
    cout<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;
    if(r == l){
       for(int i = 0; i < n; i++)
           printf("%d ", r);
       return 0;
    }
    int num = min(s2/k, r - l);
    if(num == r - l){
       for(int i = 0; i < k; i++)
           printf("%d ", r);
    }
    else{

         int diff1 = s2 - num*k;

         int mod = diff1%(r-l-num);

         for(int i = 0; i < diff1/(r-l-num); i++)
             printf("%d ", r);
         printf("%d ", num + mod + l);
         for(int i = diff1/(r-l-num) + 1; i < k; i++)
             printf("%d ", num + l);
    }
    int diff2 = num*(n-k) - s3, mod2 = diff2%(num);

    for(int i = 0; i < diff2/num; i++)
        printf("%d ", l);

    printf("%d ", num - mod2 + l);

    for(int i = diff2/num + 1; i < n - k; i++)
        printf("%d ", num + l);
    cout<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;
    int num = min(r - l, s2/k);

    if(num == r - l){
       for(int i = 0; i < k; i++)
           printf("%d ", r);
    }
    else{

         int diff1 = s2 - num*k;

         int mod = diff1%(r-l-num);
         cout<<mod<<endl;

         for(int i = 0; i < diff1/(r-l-num); i++)
             printf("%d ", r);

         printf("%d ", num + mod + l);

         for(int i = diff1/(r-l-num) + 1; i < k; i++)
             printf("%d ", num + l);

    }
    if(num == 0){
       for(int i = 0; i < n - k; i++)
           printf("%d ", l);
       return 0;
    }

    int diff2 = num*(n-k) - s3, mod2 = diff2%(num);
    int i;
    for(i = 0; i < diff2/num && i < n - k; i++)
        printf("%d ", l);
    if(i == n - k)
       return 0;

    printf("%d ", num - mod2 + l);

    for(i = diff2/num + 1; i < n - k; i++)
        printf("%d ", num + l);
    cout<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;
    if(r == l){
       for(int i = 0; i < n; i++)
           printf("%d ", r);
       return 0;
    }
    int num = min(s2/k, r - l);
    if(num == r - l){
       for(int i = 0; i < k; i++)
           printf("%d ", r);
    }
    else{

         int diff1 = s2 - num*k;

         int mod = diff1%(r-l-num);

         for(int i = 0; i < diff1/(r-l-num); i++)
             printf("%d ", r);

         printf("%d ", num + mod + l);
         for(int i = diff1/(r-l-num) + 1; i < k; i++)
             printf("%d ", num + l);
    }
    int diff2 = num*(n-k) - s3, mod2 = diff2%(num);

    int i;
    for(i = 0; i < diff2/num && i < n - k; i++)
        printf("%d ", l);
    if(i == n - k)
       return 0;

    printf("%d ", num - mod2 + l);

    for(i = diff2/num + 1; i < n - k; i++)
        printf("%d ", num + l);
    cout<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
    int n, k, l, r, s, s1;
    cin >>n >>k >>l >>r >>s >>s1;
    if(n == k){

       int d = s - l*n;
       int mod = d%n;
       for(int i = 0; i < d/n; i++)
           printf("%d ", r);
       printf("%d ", l + mod);
       for(int i = d/n + 1; i < n; i++)
           printf("%d ", l);
       return 0;
    }

    int s2 = s1 - k*l;
    int s3 = s - s1 - (n-k)*l;

    int num = min(s2/k, r - l);

    int diff1 = s2 - num*k, diff2 = num*(n-k) - s3;
    int mod1 = diff1%k, mod2 = diff2%(n-k);

    for(int i = 0; i < diff1/k; i++)
        printf("%d ", r);
    printf("%d ", num + mod1 + l);
    for(int i = diff1/k + 1; i < k; i++)
        printf("%d ", num + l);

    for(int i = 0; i < diff2/(n-k); i++)
        printf("%d ", l);

    printf("%d ", num - mod2 + l);

    for(int i = diff2/(n-k) + 1; i < n - k; i++)
        printf("%d ", num + l);
    cout<<endl;
    return 0;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{

    long n,k,l,r,sall,sk;
    cin>>n>>k>>l>>r>>sall>>sk;
    std::vector<int> vec;
    int num=round(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    int tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    cout<<sk-(num*(k-1))<<" ";
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
    }

    vec.clear();
    sk=sall-sk;
    k=n-k;
    num=round(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
    }
    cout<<sk-(num*(k-1));
    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{
    int n,k,l,r,sall,sk;
    scanf("%d %d %d %d %d %d",&n,&k,&l,&r,&sall,&sk);
    int mod=sk%k;
    for (int i = 0; i < k; ++i)
    {
        if(i)
            cout<<" ";
        if(mod-->0)
            cout<<sk/k+1;
        else
            cout<<sk/k;

    }
    if(n!=k)
    {
        mod=(sall-sk)%(n-k);
        for (int i = 0; i < n-k; ++i)
        {
            if(mod-->0)
                cout<<" "<<(sall-sk)/(n-k)+1;
            else
                cout<<" "<<(sall-sk)/(n-k);
        }
    }
    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{
	long long sum=0;
	long n,k,l,r,sall,sk,ssk;
	cin>>n>>k>>l>>r>>sall>>sk;
	ssk=sk;
	std::vector<int> vec;
	int tmpnum=0;
	int num=round(sk*1.0/k);
	for (int i = 0; i < k-1; ++i)
		vec.push_back(num);
	int tmp=0;
	while(sk-(num*(k-1))>r)
	{
		vec[tmp++%vec.size()]++;
		sk--;
	}
	while(sk-(num*(k-1))<l)
	{
		vec[tmp++%vec.size()]--;
		sk++;
	}
	cout<<sk-(num*(k-1))<<" ";
	sum+=(sk-(num*(k-1)));
	for (int i = 0; i < vec.size(); ++i)
	{
		cout<<vec[i]<<" ";
		sum+=vec[i];
	}
	//cout<<sum<<endl;
	vec.clear();
	sk=sall-ssk;
	k=n-k;
	num=sk*1.0/k;
	for (int i = 0; i < k-1; ++i)
		vec.push_back(num);
	tmp=0;
	while(sk-(num*(k-1))>r)
	{
		vec[tmp++%vec.size()]++;
		sk--;
	}
	while(sk-(num*(k-1))<l)
	{
		vec[tmp++%vec.size()]--;
		sk++;
	}
	for (int i = 0; i < vec.size(); ++i)
	{
		sum+=vec[i];
		cout<<vec[i]<<" ";
	}
	cout<<sk-(num*(k-1));
	sum+=(sk-(num*(k-1)));

	return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{
    //long long sum=0;
    int n,k,l,r,sall,sk,ssk;
    cin>>n>>k>>l>>r>>sall>>sk;
    ssk=sk;
    std::vector<int> vec;
    int tmpnum=0;
    int num=sk*1.0/k;
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    int tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    cout<<sk-(num*(k-1))<<" ";
    sum+=(sk-(num*(k-1)));
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
        sum+=vec[i];
    }
    //cout<<sum<<endl;
    vec.clear();
    sk=sall-ssk;
    k=n-k;
    num=sk*1.0/k;
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    for (int i = 0; i < vec.size(); ++i)
    {
        sum+=vec[i];
        cout<<vec[i]<<" ";
    }
    cout<<sk-(num*(k-1));
    sum+=(sk-(num*(k-1)));

    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{

    long n,k,l,r,sall,sk;
    cin>>n>>k>>l>>r>>sall>>sk;
    std::vector<int> vec;
    int num=round(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    int tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
    }
    vec.clear();
    sk=sall-sk;
    k=n-k;
    num=round(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    for (int i = 0; i < vec.size()-1; ++i)
    {
        cout<<vec[i]<<" ";
    }
    cout<<vec.back();
    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{

    long n,k,l,r,sall,sk,ssk;
    cin>>n>>k>>l>>r>>sall>>sk;
    ssk=sk;
    std::vector<int> vec;
    int num=round(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    int tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    cout<<sk-(num*(k-1))<<" ";
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
    }

    vec.clear();
    sk=sall-ssk;
    k=n-k;
    num=sk*1.0/k;
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
    }
    cout<<sk-(num*(k-1));
    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{

    long n,k,l,r,sall,sk;
    cin>>n>>k>>l>>r>>sall>>sk;

    int num=round(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        cout<<num<<" ";
    cout<<sk-(num*(k-1))<<" ";
    sk=sall-sk;
    k=n-k;
    num=round(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        cout<<num<<" ";
    cout<<sk-(num*(k-1));
    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{

    long n,k,l,r,sall,sk;
    cin>>n>>k>>l>>r>>sall>>sk;
    std::vector<int> vec;
    int num=round(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    int tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    cout<<sk-(num*(k-1))<<" ";
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
    }

    vec.clear();
    sk=sall-sk;
    k=n-k;
    num=round(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
    }
    cout<<sk-(num*(k-1));
    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{
    long long sum=0;
    long n,k,l,r,sall,sk,ssk;
    cin>>n>>k>>l>>r>>sall>>sk;
    ssk=sk;
    std::vector<int> vec;
    int tmpnum=0;
    int num=ceil(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    int tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    cout<<sk-(num*(k-1))<<" ";
    sum+=(sk-(num*(k-1)));
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
        sum+=vec[i];
    }
    //cout<<sum<<endl;
    vec.clear();
    sk=sall-ssk;
    k=n-k;
    num=sk*1.0/k;
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    for (int i = 0; i < vec.size(); ++i)
    {
        sum+=vec[i];
        cout<<vec[i]<<" ";
    }
    cout<<sk-(num*(k-1));
    sum+=(sk-(num*(k-1)));

    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{
    int n,k,l,r,sall,sk;
    scanf("%d %d %d %d %d %d",&n,&k,&l,&r,&sall,&sk);
    int mod=sk%k;
    for (int i = 0; i < k; ++i)
    {
        if(i)
            cout<<" ";
        if(mod-->0)
            cout<<sk/k+1;
        else
            cout<<sk/k;

    }
    mod=(sall-sk)%(n-k);
    for (int i = 0; i < n-k; ++i)
    {
        if(mod-->0)
            cout<<" "<<(sall-sk)/(n-k)+1;
        else
            cout<<" "<<(sall-sk)/(n-k);
    }
    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{
    long long sum=0;
    int n,k,l,r,sall,sk,ssk;
    cin>>n>>k>>l>>r>>sall>>sk;
    ssk=sk;
    std::vector<int> vec;
    int tmpnum=0;
    int num=sk*1.0/k;
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    int tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    cout<<sk-(num*(k-1))<<" ";
    sum+=(sk-(num*(k-1)));
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
        sum+=vec[i];
    }
    //cout<<sum<<endl;
    vec.clear();
    sk=sall-ssk;
    k=n-k;
    num=sk*1.0/k;
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    for (int i = 0; i < vec.size(); ++i)
    {
        sum+=vec[i];
        cout<<vec[i]<<" ";
    }
    cout<<sk-(num*(k-1));
    sum+=(sk-(num*(k-1)));

    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{

    long n,k,l,r,sall,sk;
    cin>>n>>k>>l>>r>>sall>>sk;

    int num=round(sk*1.0/k);
    for (int i = 0; i < k-1; ++i)
        cout<<num<<" ";
    cout<<sk-(num*(k-1))<<" ";
    sk=sall-sk;
    k=n-k;
    num=round(sk*1.0/k);
    for (int i = 0; i < n-k-1; ++i)
        cout<<num<<" ";
    cout<<sk-(num*(k-1));
    return 0;
}

//0:19


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{
    long long sum=0;
    long n,k,l,r,sall,sk,ssk;
    cin>>n>>k>>l>>r>>sall>>sk;
    ssk=sk;
    std::vector<int> vec;
    int tmpnum=0;
    int num=sk*1.0/k;
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    int tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    cout<<sk-(num*(k-1))<<" ";
    sum+=(sk-(num*(k-1)));
    for (int i = 0; i < vec.size(); ++i)
    {
        cout<<vec[i]<<" ";
        sum+=vec[i];
    }
    //cout<<sum<<endl;
    vec.clear();
    sk=sall-ssk;
    k=n-k;
    num=sk*1.0/k;
    for (int i = 0; i < k-1; ++i)
        vec.push_back(num);
    tmp=0;
    while(sk-(num*(k-1))>r)
    {
        vec[tmp++%vec.size()]++;
        sk--;
    }
    while(sk-(num*(k-1))<l)
    {
        vec[tmp++%vec.size()]--;
        sk++;
    }
    for (int i = 0; i < vec.size(); ++i)
    {
        sum+=vec[i];
        cout<<vec[i]<<" ";
    }
    cout<<sk-(num*(k-1));
    sum+=(sk-(num*(k-1)));

    return 0;
}

//0:19


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)
#define FORD(I, A, B) for(int I = (A); I >= (B); I--)
#define ll long long
#define F first
#define S second
#define MP make_pair
#define PB push_back

const int MAXN = 10005;

int n, k, l, r, suma, sumak, a[MAXN], ile, p;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &k, &l, &r, &suma, &sumak);

  REP(i, n)
    a[i] = l;
  REP(i, k)
    sumak -= a[i];
  REP(i, n)
    suma -= a[i];

  int mini = r;

  REP(i, k)
  {
    int o = min(sumak, suma);

    a[i] = min(a[i]+o, r);
    int kupa = a[i] - l;
    sumak -= kupa;
    suma -= kupa;

    mini = min(a[i], mini);
  }
  FOR(i, k, n-1)
  {
    a[i] = min(a[i]+suma, mini);
    suma -= (a[i] - l);
    if(suma == 0)
      break;
  }

  REP(i, n)
    printf("%d ", a[i]);
  printf("\n");

  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)
#define FORD(I, A, B) for(int I = (A); I >= (B); I--)
#define ll long long
#define F first
#define S second
#define MP make_pair
#define PB push_back

const int MAXN = 10005;

int n, k, l, r, suma, sumak, a[MAXN], ile, p, mini;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &k, &l, &r, &suma, &sumak);

  REP(i, n)
    a[i] = l;

  sumak -= k*l;
  suma -= n*l;
  mini = r;

  REP(i, k)
  {
    a[i] = min(l+sumak, r);
    sumak -= (a[i]-l), suma -= (a[i]-l);
    mini = min(a[i], mini);
  }
  FOR(i, k, n-1)
  {
    a[i] = min(l+suma, mini);
    suma -= (a[i] - l);
  }

  REP(i, n)
    printf("%d ", a[i]);
  printf("\n");

  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)
#define FORD(I, A, B) for(int I = (A); I >= (B); I--)
#define ll long long
#define F first
#define S second
#define MP make_pair
#define PB push_back

const int MAXN = 1005;

int n, k, l, r, suma, sumak, a[MAXN], ile, p;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &p, &l, &r, &suma, &sumak);

  a[0] = r;

  FOR(i, 1, n-1)
    a[i] = l;

  int k = l*(n-1);
  k += r;

  REP(i, p)
    sumak -= a[i];

  REP(i, n)
    suma -= a[i];

  int mini = 99999999;

  FOR(i, 1, p-1)
  {
    int o = min(sumak, suma);

    a[i] = min(a[i]+o, r);

    sumak -= (a[i] - l);
    suma -= (a[i] - l);

    mini = min(a[i], mini);

    if(sumak == 0 || suma == 0)
      break;
  }
  FOR(i, p, n-1)
  {
    a[i] = min(a[i]+suma, mini);
    suma -= (a[i] - l);
    if(suma == 0)
      break;
  }

  REP(i, n)
    printf("%d ", a[i]);
  printf("\n");

  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)

int n, k, l, r, suma, sumak, a[1005], mini;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &k, &l, &r, &suma, &sumak);

  REP(i, n)
    a[i] = l;
  sumak -= k*l;
  suma -= n*l;
  mini = r;

  while(sumak > 0)
  REP(i, k)
  {
    a[i]++;
    sumak--;
    suma--;
    if(sumak == 0)
      break;
  }
  while(suma > 0)
  FOR(i, k, n-1)
  {
    if(suma <= 0)
      break;
      a[i]++;
      suma--;
    if(suma <= 0)
      break;
  }
  REP(i, n)
    printf("%d ", a[i]);
  printf("\n");

  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)
#define FORD(I, A, B) for(int I = (A); I >= (B); I--)
#define ll long long
#define F first
#define S second
#define MP make_pair
#define PB push_back

const int MAXN = 10005;

int n, k, l, r, suma, sumak, a[MAXN], ile, p;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &k, &l, &r, &suma, &sumak);

  REP(i, n)
    a[i] = l;
  REP(i, k)
    sumak -= a[i];

  REP(i, n)
    suma -= a[i];

  int mini = r;

  if(sumak > 0 && suma > 0)
  FOR(i, 0, k-1)
  {
    int o = min(sumak, suma);

    a[i] = min(a[i]+o, r);
    int kupa = a[i] - l;
    sumak -= kupa;
    suma -= kupa;

    mini = min(a[i], mini);
  }

  if(suma > 0)
  FOR(i, k, n-1)
  {
    a[i] = max(l ,min(a[i]+suma, mini));
    suma -= (a[i] - l);
    if(suma == 0)
      break;
  }
  bool llol;

  REP(i, n)
  {
    printf("%d ", a[i]);
    llol = true;
  }
  if(llol)
  printf("\n");

  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)
#define FORD(I, A, B) for(int I = (A); I >= (B); I--)
#define ll long long
#define F first
#define S second
#define MP make_pair
#define PB push_back

const int MAXN = 1005;

int n, k, l, r, suma, sumak, a[MAXN], ile, p;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &p, &l, &r, &suma, &sumak);

  a[0] = r;

  FOR(i, 1, n-1)
    a[i] = l;

  REP(i, p)
    sumak -= a[i];

  REP(i, n)
    suma -= a[i];

  int mini = r;

  if(sumak > 0)
  FOR(i, 1, p-1)
  {
    int o = min(sumak, suma);

    a[i] = max(a[i], min(a[i]+o, r));

    sumak -= (a[i] - l);
    suma -= (a[i] - l);

    mini = min(a[i], mini);

    if(sumak == 0 || suma == 0)
      break;
  }

  if(suma > 0)
  FOR(i, p, n-1)
  {
    a[i] = max(a[i], min(a[i]+suma, mini));
    suma -= (a[i] - l);
    if(suma == 0)
      break;
  }

  REP(i, n)
    printf("%d ", a[i]);
  printf("\n");

  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)
#define FORD(I, A, B) for(int I = (A); I >= (B); I--)
#define ll long long
#define F first
#define S second
#define MP make_pair
#define PB push_back

const int MAXN = 1005;

int n, k, l, r, suma, sumak, a[MAXN], ile, p;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &p, &l, &r, &suma, &sumak);

  a[0] = r;

  FOR(i, 1, n-1)
    a[i] = l;

  int k = l*(n-1);
  k += r;

  if(k < suma)
    FOR(i, 1, n)
    {
      k -= a[i];
      a[i] = r;
      k += a[i];
      if(k > suma)
      {
	int p = k-suma;
	a[i] -= p;
      }
      if(k == suma)
	break;
    }
  sort(a, a+n, greater<int>());
  REP(i, p)
    ile += a[i];

  if(ile > sumak)
  {
    ile -= sumak;
    while(ile > 0)
      FOR(i, 1, p)
      {
	if(a[i] > l)
	{
	  a[i]--;
	  ile--;
	}
	if(ile == 0)
	  break;
      }
  }
  sort(a, a+n, greater<int>());

  REP(i, n)
    printf("%d ", a[i]);
  printf("\n");

  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)
#define FORD(I, A, B) for(int I = (A); I >= (B); I--)
#define ll long long
#define F first
#define S second
#define MP make_pair
#define PB push_back

const int MAXN = 1005;

int n, k, l, r, suma, sumak, a[MAXN], ile, p;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &p, &l, &r, &suma, &sumak);

  a[0] = r;

  FOR(i, 1, n-1)
    a[i] = l;

  REP(i, p)
    sumak -= a[i];

  REP(i, n)
    suma -= a[i];

  int mini = 99999999;

  FOR(i, 1, p-1)
  {
    int o = min(sumak, suma);

    a[i] = min(a[i]+o, r);

    sumak -= (a[i] - l);
    suma -= (a[i] - l);

    mini = min(a[i], mini);

    if(sumak == 0 || suma == 0)
      break;
  }

  if(suma > 0)
  FOR(i, p, n-1)
  {
    a[i] = min(a[i]+suma, mini);
    suma -= (a[i] - l);
    if(suma == 0)
      break;
  }

  REP(i, n)
    printf("%d ", a[i]);
  printf("\n");

  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)
#define FORD(I, A, B) for(int I = (A); I >= (B); I--)
#define ll long long
#define F first
#define S second
#define MP make_pair
#define PB push_back

const int MAXN = 1005;

int n, k, l, r, suma, sumak, a[MAXN], ile, p;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &p, &l, &r, &suma, &sumak);

  a[0] = r;

  FOR(i, 1, n-1)
    a[i] = l;

  REP(i, p)
    sumak -= a[i];

  REP(i, n)
    suma -= a[i];

  int mini = r;

  if(sumak > 0 && suma > 0)
  FOR(i, 1, p-1)
  {
    int kupa = a[i];
    int o = min(sumak, suma);

    a[i] = max(a[i], min(a[i]+o, r));

    sumak -= (a[i] - kupa);
    suma -= (a[i] - kupa);

    mini = min(a[i], mini);

    if(sumak == 0 || suma == 0)
      break;
  }

  if(suma > 0)
  FOR(i, p, n-1)
  {
    a[i] = max(a[i], min(a[i]+suma, mini));
    suma -= (a[i] - l);
    if(suma == 0)
      break;
  }
  bool llol;

  REP(i, n)
  {
    printf("%d ", a[i]);
    llol = true;
  }
  if(llol)
  printf("\n");

  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)

int n, k, l, r, suma, sumak, a, mini;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &k, &l, &r, &suma, &sumak);

  sumak -= k*l;
  suma -= n*l;
  mini = r;

  REP(i, k)
  {
    a = min(l+sumak, r);
    sumak -= min(r-l, sumak), suma -= min(sumak, r-l);
    mini = min(a, mini);
    printf("%d ", a);
  }

  FOR(i, k, n-1)
  {
    a = min(l+suma, mini);
    suma -= min(suma, mini-l);
    printf("%d ", a);
  }
  printf("\n");

  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;

#define REP(I, N) for(int I = 0; I < (N); I++)
#define FOR(I, A, B) for(int I = (A); I <= (B); I++)

int n, k, l, r, suma, sumak, a, mini;

int main()
{
  scanf("%d %d %d %d %d %d", &n, &k, &l, &r, &suma, &sumak);

  sumak -= k*l;
  suma -= n*l;
  mini = r;

  REP(i, k)
  {
    a = min(l+sumak, r);
    sumak -= (a-l), suma -= (a-l);
    mini = min(a, mini);
    printf("%d ", a);
  }
  FOR(i, k, n-1)
  {
    a = min(l+suma, mini);
    suma -= (a - l);
    printf("%d ", a);
  }
  printf("\n");

  return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
    int n,l,r,j,sall,sk,k,i=0,a[1002],tm1,tm2;
    cin>>n>>k>>l>>r>>sall>>sk;
    tm1=sk/k;
    tm2=k;
    while(tm2--)
    {
        a[i++]=tm1;
    }
    tm1=sall-sk;
    tm2=tm1/(n-k);
    /*if(tm1%2==1)
    {
        a[i++]=tm2+1;
        n--;
    }*/
    tm1=n-k;
    while(tm1--)
    {
        a[i++]=tm2;
    }
    sort(&a[0],&a[i]);
    for(j=0; j<i; j++)
    {
        cout<<a[j]<<" ";
    }
    return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
    int n,l,r,j,sall,sk,k,i=0,a[1002],tm1,tm2,tm;
    cin>>n>>k>>l>>r>>sall>>sk;
    tm1=sk/k;
    tm2=k;
    if(sk%k==0)
    {
        while(tm2--)
        {
            a[i++]=tm1;
        }
    }
    else
    {
        tm=sk-tm1*k;
        while(tm2--)
        {
            if(tm)
            {
                a[i++]=tm1+1;
                tm--;
            }
            else a[i++]=tm1;
        }
    }
    tm1=sall-sk;
    if(n-k!=0)
    {
        tm2=tm1/(n-k);
    }
    else tm2=0;
    if(tm2%2==0)
    {
        tm1=n-k;
        tm=sall-sk;
        if(tm1!=0)
            tm2=tm/tm1;
        else tm2=0;
        tm-=tm1*tm2;
        tm1=n-k;
        while(tm1--)
        {
            if(tm)
            {
                a[i++]=tm2+1;
                tm--;
            }
            else a[i++]=tm2;
        }
        sort(&a[0],&a[i]);
        //int sum=0;
        for(j=0; j<i; j++)
        {
            cout<<a[j]<<" ";
            //sum+=a[j];
        }
        //cout<<"\n"<<sum;
    }
    else
    {
        tm=(sall-sk);
        tm1=n-k;
        if(tm1!=0)
            tm2=tm/tm1;
        else tm2=0;
        tm-=tm1*tm2;
        tm1=n-k;
        while(tm1--)
        {
            if(tm)
            {
                a[i++]=tm2+1;
                tm--;
            }
            else a[i++]=tm2;
        }
        //int sum=0;
        sort(&a[0],&a[i]);
        for(j=0; j<i; j++)
        {
            cout<<a[j]<<" ";
            //sum+=a[j];
        }
        //cout<<"\n"<<sum;
    }
    return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
    int n,l,r,j,sall,sk,k,i=0,a[1002],tm1,tm2,tm;
    cin>>n>>k>>l>>r>>sall>>sk;
    tm1=sk/k;
    tm2=k;
    if(sk%k==0)
    {
        while(tm2--)
        {
            a[i++]=tm1;
        }
    }
    else
    {
        tm=sk-tm1*k;
        while(tm2--)
        {
            if(tm)
            {
                a[i++]=tm1+1;
                tm--;
            }
            else a[i++]=tm1;
        }
    }
    tm1=sall-sk;
    tm2=tm1/(n-k);
    if(tm2%2==0)
    {
        tm1=n-k;
        while(tm1--)
        {
            a[i++]=tm2;
        }
        sort(&a[0],&a[i]);
        for(j=0; j<i; j++)
        {
            cout<<a[j]<<" ";
        }
    }
    else
    {
        tm1=n-k;
        tm=(sall-sk)-(tm2*tm1);
        while(tm1--)
        {
            if(tm)
            {
                a[i++]=tm2+1;
                tm--;
            }
            else a[i++]=tm2;
        }
        //int sum=0;
        sort(&a[0],&a[i]);
        for(j=0; j<i; j++)
        {
            cout<<a[j]<<" ";
            //sum+=a[j];
        }
        //cout<<"\n"<<sum;
    }
    return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
    int n,l,r,j,sall,sk,k,i=0,a[1002],tm1,tm2;
    cin>>n>>k>>l>>r>>sall>>sk;
    tm1=sk/k;
    tm2=k;
    while(tm2--)
    {
        a[i++]=tm1;
    }
    tm1=sall-sk;
    tm2=tm1/(n-k);
    if(tm1%2==1)
    {
        a[i++]=tm2+1;
        n--;
    }
    tm1=n-k;
    while(tm1--)
    {
        a[i++]=tm2;
    }
    sort(&a[0],&a[i]);
    for(j=0; j<i; j++)
    {
        cout<<a[j]<<" ";
    }
    return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
    int n,l,r,j,sall,sk,k,i=0,a[1002],tm1,tm2,tm;
    cin>>n>>k>>l>>r>>sall>>sk;
    tm1=sk/k;
    tm2=k;
    if(sk%k==0)
    {
        while(tm2--)
        {
            a[i++]=tm1;
        }
    }
    else
    {
        tm=sk-tm1*k;
        while(tm2--)
        {
            if(tm)
            {
                a[i++]=tm1+1;
                tm--;
            }
            else a[i++]=tm1;
        }
    }
    tm1=sall-sk;
    if(n-k!=0)
    {
        tm2=tm1/(n-k);
    }
    else tm2=0;
    if(tm2%2==0)
    {
        tm1=n-k;
        tm=sall-sk;
        tm2=tm/tm1;
        tm-=tm1*tm2;
        tm1=n-k;
        while(tm1--)
        {
            if(tm)
            {
                a[i++]=tm2+1;
                tm--;
            }
            else a[i++]=tm2;
        }
        sort(&a[0],&a[i]);
        //int sum=0;
        for(j=0; j<i; j++)
        {
            cout<<a[j]<<" ";
            //sum+=a[j];
        }
        //cout<<"\n"<<sum;
    }
    else
    {
        tm=(sall-sk);
        tm1=n-k;
        tm2=tm/tm1;
        tm-=tm1*tm2;
        tm1=n-k;
        while(tm1--)
        {
            if(tm)
            {
                a[i++]=tm2+1;
                tm--;
            }
            else a[i++]=tm2;
        }
        //int sum=0;
        sort(&a[0],&a[i]);
        for(j=0; j<i; j++)
        {
            cout<<a[j]<<" ";
            //sum+=a[j];
        }
        //cout<<"\n"<<sum;
    }
    return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;

int main()
{
    int n,l,r,j,sall,sk,k,i=0,a[1002],tm1,tm2,tm;
    cin>>n>>k>>l>>r>>sall>>sk;
    tm1=sk/k;
    tm2=k;
    if(sk%k==0)
    {
        while(tm2--)
        {
            a[i++]=tm1;
        }
    }
    else
    {
        tm=sk-tm1*k;
        while(tm2--)
        {
            if(tm)
            {
                a[i++]=tm1+1;
                tm--;
            }
            else a[i++]=tm1;
        }
    }
    tm1=sall-sk;
    if(n-k!=0)
    {
        tm2=tm1/(n-k);
    }
    else tm2=0;
    if(tm2%2==0)
    {
        tm1=n-k;
        while(tm1--)
        {
            a[i++]=tm2;
        }
        sort(&a[0],&a[i]);
        for(j=0; j<i; j++)
        {
            cout<<a[j]<<" ";
        }
    }
    else
    {
        tm1=n-k;
        tm=(sall-sk)-(tm2*tm1);
        while(tm1--)
        {
            if(tm)
            {
                a[i++]=tm2+1;
                tm--;
            }
            else a[i++]=tm2;
        }
        //int sum=0;
        sort(&a[0],&a[i]);
        for(j=0; j<i; j++)
        {
            cout<<a[j]<<" ";
            //sum+=a[j];
        }
        //cout<<"\n"<<sum;
    }
    return 0;
}


#include<iostream>
#include<stdio.h>
#include<sstream>
#include<fstream>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#define  FOR(i,x,n) for(int i=x;i<n;i++)
#define rFOR(i,x,n) for(int i=x;i>n;i--)
#define  LFOR(i,x,n) for(long long i=x;i<n;i++)
#define rLFOR(i,x,n) for(long long i=x;i>n;i--)
#define b_e(x) x.begin(),x.end()
#define rb_re(x) x.rbegin(),x.rend()
#define p_b push_back
#define m_p make_pair
#define SZ size()
#define srt insert
#define CL clear()
#define DE delete
#define LL long long
#define S string
#define SS stringstream
#define g_l(x)  getline(cin,x)
#define CIN(x)  scanf("%d",&x)
#define CIN2(x,y) scanf("%d%d",&x,&y)
#define CLN(x)  scanf("%I64d",&x)
#define CLN2(x,y)  scanf("%I64d %I64d",&x,&y)
#define CSN(x)  scanf("100000s",&x)
#define CIUT(x) printf("%d",x)
#define CLUT(x) printf("%I64d",x)
using namespace std;

int main()
{
    int n,k,l,r,sall,sk,vk,rk,re,s=0,vr,rr;
    vector<int> v;
    cin >> n >> k >> l >> r >> sall >> sk;
    vk = sk/k;
    rk = sk%k;
        while(rk--){
            v.p_b(vk+1);
            s+=(vk+1);
            k--;
        }
    while(k--){
        v.p_b(vk);
        s+=vk;
    }
    re = n - v.SZ;
    if(re!=0){
    vr = (sall-s)/re;
    rr = (sall-s)%re;}
    else vr = rr = 0;
        while(rr--){
            v.p_b(vr+1);
            re--;
        }
    while(re--){
        v.p_b(vr);
    }
    FOR(i,0,v.SZ)cout << v[i] <<" ";
    return 0;
}


#include<iostream>
#include<stdio.h>
#include<sstream>
#include<fstream>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#define  FOR(i,x,n) for(int i=x;i<n;i++)
#define rFOR(i,x,n) for(int i=x;i>n;i--)
#define  LFOR(i,x,n) for(long long i=x;i<n;i++)
#define rLFOR(i,x,n) for(long long i=x;i>n;i--)
#define b_e(x) x.begin(),x.end()
#define rb_re(x) x.rbegin(),x.rend()
#define p_b push_back
#define m_p make_pair
#define SZ size()
#define srt insert
#define CL clear()
#define DE delete
#define LL long long
#define S string
#define SS stringstream
#define g_l(x)  getline(cin,x)
#define CIN(x)  scanf("%d",&x)
#define CIN2(x,y) scanf("%d%d",&x,&y)
#define CLN(x)  scanf("%I64d",&x)
#define CLN2(x,y)  scanf("%I64d %I64d",&x,&y)
#define CSN(x)  scanf("100000s",&x)
#define CIUT(x) printf("%d",x)
#define CLUT(x) printf("%I64d",x)
using namespace std;

int main()
{
    int n,k,l,r,sall,sk,vk,rk,re,s=0,vr,rr;
    vector<int> v;
    cin >> n >> k >> l >> r >> sall >> sk;
    vk = sk/k;
    rk = sk%k;
    v.p_b(vk+rk); k--; s+=(vk+rk);
    while(k--){
        v.p_b(vk);
        s+=vk;
    }
    re = n - v.SZ;
    vr = (sall-s)/re;
    rr = (sall-s)%re;
    v.p_b(vr+rr); re--;
    while(re--){
        v.p_b(vr);
    }
    FOR(i,0,v.SZ)cout << v[i] <<" ";
    return 0;
}


#include<iostream>
#include<stdio.h>
#include<sstream>
#include<fstream>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#define  FOR(i,x,n) for(int i=x;i<n;i++)
#define rFOR(i,x,n) for(int i=x;i>n;i--)
#define  LFOR(i,x,n) for(long long i=x;i<n;i++)
#define rLFOR(i,x,n) for(long long i=x;i>n;i--)
#define b_e(x) x.begin(),x.end()
#define rb_re(x) x.rbegin(),x.rend()
#define p_b push_back
#define m_p make_pair
#define SZ size()
#define srt insert
#define CL clear()
#define DE delete
#define LL long long
#define S string
#define SS stringstream
#define g_l(x)  getline(cin,x)
#define CIN(x)  scanf("%d",&x)
#define CIN2(x,y) scanf("%d%d",&x,&y)
#define CLN(x)  scanf("%I64d",&x)
#define CLN2(x,y)  scanf("%I64d %I64d",&x,&y)
#define CSN(x)  scanf("100000s",&x)
#define CIUT(x) printf("%d",x)
#define CLUT(x) printf("%I64d",x)
using namespace std;

int main()
{
    int n,k,l,r,sall,sk,vk,rk,re,s=0,vr,rr;
    vector<int> v;
    cin >> n >> k >> l >> r >> sall >> sk;
    vk = sk/k;
    rk = sk%k;
//    if (vk+rk <= r){
    v.p_b(vk+rk); k--; s+=(vk+rk);
//    }
//    else{
//        cout << "brvfecds" << endl;
//        while(rk--){
//            v.p_b(vk+1);
//            s+=(vk+1);
//            k--;
//        }
//    }
    while(k--){
        v.p_b(vk);
        s+=vk;
    }
    re = n - v.SZ;
    vr = (sall-s)/re;
    rr = (sall-s)%re;
    if (vr+rr <= r){
    v.p_b(vr+rr); re--;}
    else{
        while(rr--){
            v.p_b(vr+1);
            re--;
        }
    }
    while(re--){
        v.p_b(vr);
    }
    FOR(i,0,v.SZ)cout << v[i] <<" ";
    return 0;
}


#include<iostream>
#include<stdio.h>
#include<sstream>
#include<fstream>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#define  FOR(i,x,n) for(int i=x;i<n;i++)
#define rFOR(i,x,n) for(int i=x;i>n;i--)
#define  LFOR(i,x,n) for(long long i=x;i<n;i++)
#define rLFOR(i,x,n) for(long long i=x;i>n;i--)
#define b_e(x) x.begin(),x.end()
#define rb_re(x) x.rbegin(),x.rend()
#define p_b push_back
#define m_p make_pair
#define SZ size()
#define srt insert
#define CL clear()
#define DE delete
#define LL long long
#define S string
#define SS stringstream
#define g_l(x)  getline(cin,x)
#define CIN(x)  scanf("%d",&x)
#define CIN2(x,y) scanf("%d%d",&x,&y)
#define CLN(x)  scanf("%I64d",&x)
#define CLN2(x,y)  scanf("%I64d %I64d",&x,&y)
#define CSN(x)  scanf("100000s",&x)
#define CIUT(x) printf("%d",x)
#define CLUT(x) printf("%I64d",x)
using namespace std;

int main()
{
    int n,k,l,r,sall,sk,vk,rk,re;
    vector<int> v;
    cin >> n >> k >> l >> r >> sall >> sk;
    vk = sk/k;
    rk = sk%k;
    v.p_b(vk+rk); k--;
    while(k--){
        v.p_b(vk);
    }
    re = n - v.SZ;
    while(re--){
        v.p_b((l+r)/2);
    }
    FOR(i,0,v.SZ)cout << v[i] <<" ";
    return 0;
}


#include<iostream>
#include<stdio.h>
#include<sstream>
#include<fstream>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#define  FOR(i,x,n) for(int i=x;i<n;i++)
#define rFOR(i,x,n) for(int i=x;i>n;i--)
#define  LFOR(i,x,n) for(long long i=x;i<n;i++)
#define rLFOR(i,x,n) for(long long i=x;i>n;i--)
#define b_e(x) x.begin(),x.end()
#define rb_re(x) x.rbegin(),x.rend()
#define p_b push_back
#define m_p make_pair
#define SZ size()
#define srt insert
#define CL clear()
#define DE delete
#define LL long long
#define S string
#define SS stringstream
#define g_l(x)  getline(cin,x)
#define CIN(x)  scanf("%d",&x)
#define CIN2(x,y) scanf("%d%d",&x,&y)
#define CLN(x)  scanf("%I64d",&x)
#define CLN2(x,y)  scanf("%I64d %I64d",&x,&y)
#define CSN(x)  scanf("100000s",&x)
#define CIUT(x) printf("%d",x)
#define CLUT(x) printf("%I64d",x)
using namespace std;

int main()
{
    int n,k,l,r,sall,sk,vk,rk,re,s=0,vr,rr,diff;
    vector<int> v;
    cin >> n >> k >> l >> r >> sall >> sk;
    vk = sk/k;
    rk = sk%k;
    if (vk+rk <= r){
    v.p_b(vk+rk); k--; s+=(vk+rk);
    }
    else{
        diff = r - (vk+rk);
        while(diff--){
            v.p_b(vk+1);
            s+=(vk+1);
            k--;
        }
    }
    while(k--){
        v.p_b(vk);
        s+=vk;
    }
    re = n - v.SZ;
    vr = (sall-s)/re;
    rr = (sall-s)%re;
    if (vr+rr <= r){
    v.p_b(vr+rr); re--;}
    else{
        diff = r - (vr+rr);
        while(diff--){
            v.p_b(vr+1);
            re--;
        }
    }
    while(re--){
        v.p_b(vr);
    }
    FOR(i,0,v.SZ)cout << v[i] <<" ";
    return 0;
}