# Path: MTG/permanent.py
# class Status():
# class Effect():
# class Permanent(gameobject.GameObject):
# class Aura(Permanent):
#     def __init__(self):
#     def __repr__(self):
#     def __str__(self):
#     def reset(self):
#     def __init__(self, value, timestamp, apply_target=None, source=None, expiration=math.inf, is_active=True,
#                  toggle_func=lambda eff: False):
#     def __init__(self, characteristics, controller, owner=None, original_card=None,
#                  status=None, modifications=[]):
#     def __repr__(self):
#     def __str__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __hash__(self):
#     def activate_ability(self, num=0):
#     def add_effect(self, name, value, source=None, expiration=math.inf,
#                    is_active=True, toggle_func=lambda eff: True):
#     def get_effect(self, name):
#     def check_effect_expiration(self):
#     def tap(self):
#     def untap(self):
#     def freeze(self):
#     def power(self):
#     def toughness(self):
#     def add_counter(self, counter="+1/+1", num=1):
#     def num_counters(self, counter):
#     def _calculate_pt(self):
#     def is_summoning_sick(self):
#     def can_attack(self):
#     def can_block(self, attackers=None):
#     def attacks(self, player):
#     def blocks(self, creature):
#     def in_combat(self):
#     def exits_combat(self):
#     def take_damage(self, source, dmg, is_combat=False):
#     def deals_damage(self, target, dmg, is_combat=False):
#     def trigger(self, condition, source=None, amount=1):
#     def change_zone(self, target_zone, from_top=0, shuffle=True,
#                     status_mod=None, modi_func=None):
#     def dies(self):
#     def destroy(self):
#     def sacrifice(self):
#     def exile(self):
#     def bounce(self):
#     def flicker(self):
#     def __init__(self, enchant_target, characteristics, controller, owner=None, original_card=None):
#     def enchant(self, target):
#     def disenchant(self):
#     def add_ability(self, ability):
#     def add_pt(self, PT):
# def make_permanent(card, status_mod=None, modi_func=None):
# def make_aura(card, enchant_target):
# 
# Path: MTG/gameobject.py
# class Characteristics():
# class GameObject():
#     def __init__(self,
#                  name='',
#                  mana_cost='',
#                  color=[],
#                  types=[],
#                  subtype=[],
#                  supertype=[],
#                  text='',
#                  abilities=[],
#                  power=None,
#                  toughness=None,
#                  loyalty=None):
#     def __repr__(self):
#     def satisfy(self, criteria):
#     def __init__(self, characteristics=None,
#                  controller=None, owner=None, zone=None, 
#                  previousState=None):
#     def __repr__(self):
#     def __str__(self):
#     def __eq__(x, y):
#     def __hash__(self):
#     def owner(self):
#     def game(self):
#     def is_permanent(self):
#     def is_spell(self):
#     def name(self):
#     def raw_manacost(self):
#     def manacost(self):
#     def is_land(self):
#     def is_basic_land(self):
#     def is_creature(self):
#     def is_instant(self):
#     def is_sorcery(self):
#     def is_artifact(self):
#     def is_enchantment(self):
#     def is_aura(self):
#     def is_equipment(self):
#     def power(self):
#     def toughness(self):
#     def has_ability(self, ability):
#     def share_color(self, other):
#     def has_color(self, color):
#     def is_color(self, color):
#     def is_monocolored(self):
#     def is_multicolored(self):
#     def is_colorless(self):
#     def has_subtype(self, subtype):
#     def exile(self):
#     def targets(self):
#     def target_legality(self):
#     def has_valid_target(self):
#     def choose_targets(self):
#     def change_zone(self, target_zone, from_top=0, shuffle=True,
#                     status_mod=None, modi_func=None):
# 
# Path: MTG/cardtype.py
# class SuperType(Enum):
# class CardType(Enum):
# class LandType(Enum):
#     BASIC = 0
#     LEGENDARY = 1
#     SNOW = 2
#     WORLD = 3
#     ARTIFACT = 0
#     CREATURE = 1
#     ENCHANTMENT = 2
#     INSTANT = 3
#     LAND = 4
#     PLANESWALKER = 5
#     SORCERY = 6
#     TRIBAL = 7
#     PLAINS = 0
#     ISLAND = 1
#     SWAMP = 2
#     MOUNTAIN = 3
#     FOREST = 4
# 
# Path: MTG/static_abilities.py
# class StaticAbilities(Enum):
# 
# Path: MTG/utils.py
# def get_card_from_user_input(player, string):
# def choose_targets(source):
# def parse_targets(criterias):
# def parse_ability_costs(cost):


import re
from collections import defaultdict
from MTG import permanent
from MTG import gameobject
from MTG import cardtype
from MTG import static_abilities
from MTG import utils
            p, t = None, None
            color, *c_type = attributes.split(' ')
            types = [cardtype.CardType[c_type.pop().upper()]]

        color = {'colorless': 'C',
                 'white': 'W',
                 'blue': 'U',
                 'black': 'B',
                 'red': 'R',
                 'green': 'G'}[color]

        name = ' '.join(c_type)
        
        print("making token... %s" % attributes)

        if isinstance(keyword_abilities, str):
            keyword_abilities = [keyword_abilities]
            print("with %s" % ' '.join(keyword_abilities))

        for ablty in activated_abilities:
            ablty[0] = utils.parse_ability_costs(ablty[0])


        for i in range(num):
            characteristics = gameobject.Characteristics(name='Token: %s' % name,
                                                         types=types,
                                                         power=p,
                                                         toughness=t,
                                                         subtype=c_type,
                                                         color=[color],

# Path: MTG/permanent.py
# class Status():
# class Effect():
# class Permanent(gameobject.GameObject):
# class Aura(Permanent):
#     def __init__(self):
#     def __repr__(self):
#     def __str__(self):
#     def reset(self):
#     def __init__(self, value, timestamp, apply_target=None, source=None, expiration=math.inf, is_active=True,
#                  toggle_func=lambda eff: False):
#     def __init__(self, characteristics, controller, owner=None, original_card=None,
#                  status=None, modifications=[]):
#     def __repr__(self):
#     def __str__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __hash__(self):
#     def activate_ability(self, num=0):
#     def add_effect(self, name, value, source=None, expiration=math.inf,
#                    is_active=True, toggle_func=lambda eff: True):
#     def get_effect(self, name):
#     def check_effect_expiration(self):
#     def tap(self):
#     def untap(self):
#     def freeze(self):
#     def power(self):
#     def toughness(self):
#     def add_counter(self, counter="+1/+1", num=1):
#     def num_counters(self, counter):
#     def _calculate_pt(self):
#     def is_summoning_sick(self):
#     def can_attack(self):
#     def can_block(self, attackers=None):
#     def attacks(self, player):
#     def blocks(self, creature):
#     def in_combat(self):
#     def exits_combat(self):
#     def take_damage(self, source, dmg, is_combat=False):
#     def deals_damage(self, target, dmg, is_combat=False):
#     def trigger(self, condition, source=None, amount=1):
#     def change_zone(self, target_zone, from_top=0, shuffle=True,
#                     status_mod=None, modi_func=None):
#     def dies(self):
#     def destroy(self):
#     def sacrifice(self):
#     def exile(self):
#     def bounce(self):
#     def flicker(self):
#     def __init__(self, enchant_target, characteristics, controller, owner=None, original_card=None):
#     def enchant(self, target):
#     def disenchant(self):
#     def add_ability(self, ability):
#     def add_pt(self, PT):
# def make_permanent(card, status_mod=None, modi_func=None):
# def make_aura(card, enchant_target):
# 
# Path: MTG/gameobject.py
# class Characteristics():
# class GameObject():
#     def __init__(self,
#                  name='',
#                  mana_cost='',
#                  color=[],
#                  types=[],
#                  subtype=[],
#                  supertype=[],
#                  text='',
#                  abilities=[],
#                  power=None,
#                  toughness=None,
#                  loyalty=None):
#     def __repr__(self):
#     def satisfy(self, criteria):
#     def __init__(self, characteristics=None,
#                  controller=None, owner=None, zone=None, 
#                  previousState=None):
#     def __repr__(self):
#     def __str__(self):
#     def __eq__(x, y):
#     def __hash__(self):
#     def owner(self):
#     def game(self):
#     def is_permanent(self):
#     def is_spell(self):
#     def name(self):
#     def raw_manacost(self):
#     def manacost(self):
#     def is_land(self):
#     def is_basic_land(self):
#     def is_creature(self):
#     def is_instant(self):
#     def is_sorcery(self):
#     def is_artifact(self):
#     def is_enchantment(self):
#     def is_aura(self):
#     def is_equipment(self):
#     def power(self):
#     def toughness(self):
#     def has_ability(self, ability):
#     def share_color(self, other):
#     def has_color(self, color):
#     def is_color(self, color):
#     def is_monocolored(self):
#     def is_multicolored(self):
#     def is_colorless(self):
#     def has_subtype(self, subtype):
#     def exile(self):
#     def targets(self):
#     def target_legality(self):
#     def has_valid_target(self):
#     def choose_targets(self):
#     def change_zone(self, target_zone, from_top=0, shuffle=True,
#                     status_mod=None, modi_func=None):
# 
# Path: MTG/cardtype.py
# class SuperType(Enum):
# class CardType(Enum):
# class LandType(Enum):
#     BASIC = 0
#     LEGENDARY = 1
#     SNOW = 2
#     WORLD = 3
#     ARTIFACT = 0
#     CREATURE = 1
#     ENCHANTMENT = 2
#     INSTANT = 3
#     LAND = 4
#     PLANESWALKER = 5
#     SORCERY = 6
#     TRIBAL = 7
#     PLAINS = 0
#     ISLAND = 1
#     SWAMP = 2
#     MOUNTAIN = 3
#     FOREST = 4
# 
# Path: MTG/static_abilities.py
# class StaticAbilities(Enum):
# 
# Path: MTG/utils.py
# def get_card_from_user_input(player, string):
# def choose_targets(source):
# def parse_targets(criterias):
# def parse_ability_costs(cost):


# Path: MTG/token.py
import re
from collections import defaultdict
from MTG import permanent
from MTG import gameobject
from MTG import cardtype
from MTG import static_abilities
from MTG import utils

            p, t = None, None
            color, *c_type = attributes.split(' ')
            types = [cardtype.CardType[c_type.pop().upper()]]

        color = {'colorless': 'C',
                 'white': 'W',
                 'blue': 'U',
                 'black': 'B',
                 'red': 'R',
                 'green': 'G'}[color]

        name = ' '.join(c_type)
        
        print("making token... %s" % attributes)

        if isinstance(keyword_abilities, str):
            keyword_abilities = [keyword_abilities]
            print("with %s" % ' '.join(keyword_abilities))

        for ablty in activated_abilities:
            ablty[0] = utils.parse_ability_costs(ablty[0])


        for i in range(num):
            characteristics = gameobject.Characteristics(name='Token: %s' % name,
                                                         types=types,
                                                         power=p,
                                                         toughness=t,
                                                         subtype=c_type,
                                                         color=[color],

                                                         abilities=[static_abilities.StaticAbilities[a] for a in keyword_abilities])