Module ImportFrom alias alias FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad For NameStore Call NameLoad BinOpSub NameLoad Num body If CompareLt SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad Num body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Return NameLoad For NameStore Call NameLoad BinOpAdd NameLoad Num NameLoad body If CompareGt SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad body Assign NameStore NameLoad Assign TupleStore SubscriptStore NameLoad Index NameLoad SubscriptStore NameLoad Index NameLoad TupleLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpAdd NameLoad Num Assign NameStore BinOpSub NameLoad Num While CompareLt NameLoad NameLoad body Assign TupleStore SubscriptStore NameLoad Index NameLoad SubscriptStore NameLoad Index NameLoad TupleLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad AugAssignAdd NameStore Num AugAssignSub NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Num For NameStore NameLoad body Assign NameStore BinOpAdd BinOpMult Num NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Str For NameStore NameLoad body AugAssignAdd NameStore SubscriptLoad NameLoad Index Num Assign NameStore BinOpAdd BinOpMult ListLoad Str BinOpSub Num Call NameLoad NameLoad NameLoad Assign NameStore Num While NameLoad body Assign NameStore DictComp SubscriptLoad NameLoad Index NameLoad NameLoad comprehension NameStore Call NameLoad Num If CompareNotIn SubscriptLoad NameLoad Index Num NameLoad body Assign NameStore UnaryOpUSub Call NameLoad SubscriptLoad NameLoad Index BinOpSub NameLoad Num NameLoad For NameStore SubscriptLoad NameLoad Slice BinOpSub NameLoad Num body AugAssignAdd NameStore Call NameLoad NameLoad NameLoad If CompareEq NameLoad Num body AugAssignAdd NameStore Num If UnaryOpNot Call NameLoad NameLoad body Break Return NameLoad decorator_list If CompareEq NameLoad Str body If CompareGt Call NameLoad NameLoad Num body Assign NameStore SubscriptLoad NameLoad Slice Num If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num While NameLoad body Print NameLoad If UnaryOpNot Call NameLoad NameLoad body Expr Call NameLoad Num FunctionDef arguments args defaults body Return Call AttributeLoad Call AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args defaults body Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list Assign NameStore Call NameLoad Assign NameStore ListComp Call NameLoad comprehension NameStore Call NameLoad NameLoad Print Call NameLoad NameLoad
N/A sys stdin argv next_permutation N/A N/A tab N/A N/A N/A find the next permutation of tab in the lexicographical order

    :param tab: table with n elements from an ordered set
    :modifies: table to next permutation
    :returns: False if permutation is already lexicographical maximal
    :complexity: O(n)
     N/A n N/A len tab N/A pivot None N/A i N/A range N/A n 1 N/A N/A N/A N/A tab N/A i N/A tab N/A N/A i 1 N/A N/A pivot i N/A N/A pivot None N/A N/A False N/A i N/A range N/A pivot 1 n N/A N/A N/A N/A tab N/A i N/A tab N/A pivot N/A N/A swap i N/A N/A N/A tab N/A swap N/A tab N/A pivot N/A N/A tab N/A pivot N/A tab N/A swap N/A i N/A pivot 1 N/A j N/A n 1 N/A N/A i j N/A N/A N/A N/A tab N/A i N/A tab N/A j N/A N/A tab N/A j N/A tab N/A i N/A i 1 N/A j 1 N/A True N/A convert N/A N/A word ass N/A N/A N/A retval 0 N/A x word N/A N/A retval N/A N/A 10 retval N/A ass N/A x N/A retval N/A solve_word_addition N/A N/A S N/A N/A N/A n N/A len S N/A letters N/A sorted N/A list N/A set N/A N/A join S N/A not_zero N/A word S N/A N/A not_zero N/A word N/A 0 N/A tab N/A N/A N/A @ N/A 10 N/A len letters letters N/A count 0 N/A True N/A N/A ass N/A N/A tab N/A i i N/A i N/A range 10 N/A N/A N/A tab N/A 0 not_zero N/A N/A sum N/A N/A convert N/A S N/A N/A n 1 ass N/A word N/A S N/A N/A n 1 N/A N/A sum N/A convert word ass N/A N/A sum 0 N/A N/A count 1 N/A N/A N/A next_permutation tab N/A N/A N/A count N/A N/A N/A __name__ __main__ N/A N/A N/A N/A len argv 1 N/A N/A L N/A argv N/A 1 N/A N/A N/A len L 1 N/A N/A L N/A list N/A L N/A 0 N/A True N/A N/A L N/A N/A N/A next_permutation L N/A N/A N/A exit 0 _readstr N/A N/A N/A N/A N/A N/A N/A N/A N/A stdin readline strip N/A _readint N/A N/A N/A N/A N/A N/A int N/A N/A stdin readline N/A N/A n N/A _readint N/A S N/A N/A _readstr N/A _ N/A range n N/A N/A solve_word_addition S