private String wrap(String text, int lenght){
        String[] words = text.split("\\s");

        StringBuilder ans = new StringBuilder();

        int curLenght = 0;

        for(String word : words){
            curLenght += word.length();
            if(curLenght <= lenght){
                ans.append(" ");
            }else{
                ans.append("\n");
                curLenght = 0;
            }
            ans.append(word);
        }
        return ans.substring(1);

    }