import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.NavigableMap;
import java.util.StringTokenizer;
import java.util.TreeMap;

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

    static class Task {
        int N;
        long ans = 0;
        Map<String, Long> anagramCnt = new HashMap<>();

        void solve(InputReader in, PrintWriter out) {
            N = in.nextInt();
            for (int i = 0; i < N; ++i) {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            }
            for (long v : anagramCnt.values()) {
                ans += v*(v - 1) / 2;
            }
            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

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

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        int[] nextIntArray(int size) {
            int[] arr = new int[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

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

        long[] nextLongArray(int size) {
            long[] arr = new long[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.NavigableMap; NavigableMap java.util import java.util.StringTokenizer; StringTokenizer java.util import java.util.TreeMap; TreeMap java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }

    static class Task {
        int N;
        long ans = 0;
        Map<String, Long> anagramCnt = new HashMap<>();

        void solve(InputReader in, PrintWriter out) {
            N = in.nextInt();
            for (int i = 0; i < N; ++i) {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            }
            for (long v : anagramCnt.values()) {
                ans += v*(v - 1) / 2;
            }
            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

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

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        int[] nextIntArray(int size) {
            int[] arr = new int[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

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

        long[] nextLongArray(int size) {
            long[] arr = new long[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) Task solver = new Task(); solver new Task() solver.solve(in, out) solver.solve solver in out out.close() out.close out String[] args args static class Task {
        int N;
        long ans = 0;
        Map<String, Long> anagramCnt = new HashMap<>();

        void solve(InputReader in, PrintWriter out) {
            N = in.nextInt();
            for (int i = 0; i < N; ++i) {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            }
            for (long v : anagramCnt.values()) {
                ans += v*(v - 1) / 2;
            }
            out.println(ans);
        }

    } Task int N; N long ans = 0; ans 0 Map<String, Long> anagramCnt = new HashMap<>(); anagramCnt new HashMap<>() void solve(InputReader in, PrintWriter out) {
            N = in.nextInt();
            for (int i = 0; i < N; ++i) {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            }
            for (long v : anagramCnt.values()) {
                ans += v*(v - 1) / 2;
            }
            out.println(ans);
        } solve {
            N = in.nextInt();
            for (int i = 0; i < N; ++i) {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            }
            for (long v : anagramCnt.values()) {
                ans += v*(v - 1) / 2;
            }
            out.println(ans);
        } N = in.nextInt() N in.nextInt() in.nextInt in for (int i = 0; i < N; ++i) {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            } int i = 0; int i = 0; i 0 i < N i N ++i ++i i {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            } {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            } String s = in.next(); s in.next() in.next in NavigableMap<Character, Integer> charCnt = new TreeMap<>(); charCnt new TreeMap<>() for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                } char c s.toCharArray() s.toCharArray s {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                } {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                } int v = charCnt.containsKey(c) ? charCnt.get(c) : 0; v charCnt.containsKey(c) ? charCnt.get(c) : 0 charCnt.containsKey(c) charCnt.containsKey charCnt c charCnt.get(c) charCnt.get charCnt c 0 charCnt.put(c, v + 1) charCnt.put charCnt c v + 1 v 1 StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                } Map.Entry<Character, Integer> e charCnt.entrySet() charCnt.entrySet charCnt {
                    sb.append(e.getKey()).append(e.getValue());
                } {
                    sb.append(e.getKey()).append(e.getValue());
                } sb.append(e.getKey()).append(e.getValue()) sb.append(e.getKey()).append sb.append(e.getKey()) sb.append sb e.getKey() e.getKey e e.getValue() e.getValue e String key = sb.toString(); key sb.toString() sb.toString sb long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0; v anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0 anagramCnt.containsKey(key) anagramCnt.containsKey anagramCnt key anagramCnt.get(key) anagramCnt.get anagramCnt key 0 anagramCnt.put(key, v + 1) anagramCnt.put anagramCnt key v + 1 v 1 for (long v : anagramCnt.values()) {
                ans += v*(v - 1) / 2;
            } long v anagramCnt.values() anagramCnt.values anagramCnt {
                ans += v*(v - 1) / 2;
            } {
                ans += v*(v - 1) / 2;
            } ans += v*(v - 1) / 2 ans v*(v - 1) / 2 v*(v - 1) v (v - 1) v 1 2 out.println(ans) out.println out ans InputReader in in PrintWriter out out static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

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

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        int[] nextIntArray(int size) {
            int[] arr = new int[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

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

        long[] nextLongArray(int size) {
            long[] arr = new long[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
    } InputReader BufferedReader reader; reader StringTokenizer tokenizer; tokenizer InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        } InputReader {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        } reader = new BufferedReader(new InputStreamReader(stream)) reader new BufferedReader(new InputStreamReader(stream)) tokenizer = null tokenizer null InputStream stream stream String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } next {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    tokenizer = new StringTokenizer(reader.readLine());
                } tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next int[] nextIntArray(int size) {
            int[] arr = new int[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextInt();
            }
            return arr;
        } nextIntArray {
            int[] arr = new int[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextInt();
            }
            return arr;
        } int[] arr = new int[size]; arr new int[size] size for (int i = 0; i < size; i++) {
                arr[i] = nextInt();
            } int i = 0; int i = 0; i 0 i < size i size i++ i++ i {
                arr[i] = nextInt();
            } {
                arr[i] = nextInt();
            } arr[i] = nextInt() arr[i] arr i nextInt() nextInt return arr; arr int size size long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next long[] nextLongArray(int size) {
            long[] arr = new long[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextLong();
            }
            return arr;
        } nextLongArray {
            long[] arr = new long[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextLong();
            }
            return arr;
        } long[] arr = new long[size]; arr new long[size] size for (int i = 0; i < size; i++) {
                arr[i] = nextLong();
            } int i = 0; int i = 0; i 0 i < size i size i++ i++ i {
                arr[i] = nextLong();
            } {
                arr[i] = nextLong();
            } arr[i] = nextLong() arr[i] arr i nextLong() nextLong return arr; arr int size size public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }

    static class Task {
        int N;
        long ans = 0;
        Map<String, Long> anagramCnt = new HashMap<>();

        void solve(InputReader in, PrintWriter out) {
            N = in.nextInt();
            for (int i = 0; i < N; ++i) {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            }
            for (long v : anagramCnt.values()) {
                ans += v*(v - 1) / 2;
            }
            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

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

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        int[] nextIntArray(int size) {
            int[] arr = new int[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

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

        long[] nextLongArray(int size) {
            long[] arr = new long[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }

    static class Task {
        int N;
        long ans = 0;
        Map<String, Long> anagramCnt = new HashMap<>();

        void solve(InputReader in, PrintWriter out) {
            N = in.nextInt();
            for (int i = 0; i < N; ++i) {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            }
            for (long v : anagramCnt.values()) {
                ans += v*(v - 1) / 2;
            }
            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

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

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        int[] nextIntArray(int size) {
            int[] arr = new int[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

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

        long[] nextLongArray(int size) {
            long[] arr = new long[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.NavigableMap;
import java.util.StringTokenizer;
import java.util.TreeMap;

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

    static class Task {
        int N;
        long ans = 0;
        Map<String, Long> anagramCnt = new HashMap<>();

        void solve(InputReader in, PrintWriter out) {
            N = in.nextInt();
            for (int i = 0; i < N; ++i) {
                String s = in.next();
                NavigableMap<Character, Integer> charCnt = new TreeMap<>();
                for (char c : s.toCharArray()) {
                    int v = charCnt.containsKey(c) ? charCnt.get(c) : 0;
                    charCnt.put(c, v + 1);
                }
                StringBuilder sb = new StringBuilder();
                for (Map.Entry<Character, Integer> e : charCnt.entrySet()) {
                    sb.append(e.getKey()).append(e.getValue());
                }
                String key = sb.toString();
                long v = anagramCnt.containsKey(key) ? anagramCnt.get(key) : 0;
                anagramCnt.put(key, v + 1);
            }
            for (long v : anagramCnt.values()) {
                ans += v*(v - 1) / 2;
            }
            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

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

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        int[] nextIntArray(int size) {
            int[] arr = new int[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

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

        long[] nextLongArray(int size) {
            long[] arr = new long[size];
            for (int i = 0; i < size; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
    }
}