public static void main(String[] args) {
		String[] a = { "abda", "sdfa", "qweg", "ndpl", "lkiu", "sdud" };
		int N = a.length;
		int W = a[0].length();

		sort(a, W);

		for (int i = 0; i < N; i++) {
			System.out.println(a[i]);
		}
	}