import collections
class MyOrderedDict(collections.OrderedDict):
  def next_key(self, key):
    next = self._OrderedDict__map[key][1]
    if next is self._OrderedDict__root:
      raise ValueError("{!r} is the last key".format(key))
    return next[2]
  
  def first_key(self):
    for key in self: return key
    raise ValueError("OrderedDict() is empty")
8d1ee0ec57329ad69a358bba2662331708ea7b55
<mask token>


class MyOrderedDict(collections.OrderedDict):
    <mask token>
    <mask token>

<mask token>


class MyOrderedDict(collections.OrderedDict):
    <mask token>

    def first_key(self):
        for key in self:
            return key
        raise ValueError('OrderedDict() is empty')

<mask token>


class MyOrderedDict(collections.OrderedDict):

    def next_key(self, key):
        next = self._OrderedDict__map[key][1]
        if next is self._OrderedDict__root:
            raise ValueError('{!r} is the last key'.format(key))
        return next[2]

    def first_key(self):
        for key in self:
            return key
        raise ValueError('OrderedDict() is empty')

import collections


class MyOrderedDict(collections.OrderedDict):

    def next_key(self, key):
        next = self._OrderedDict__map[key][1]
        if next is self._OrderedDict__root:
            raise ValueError('{!r} is the last key'.format(key))
        return next[2]

    def first_key(self):
        for key in self:
            return key
        raise ValueError('OrderedDict() is empty')

import collections
class MyOrderedDict(collections.OrderedDict):
  def next_key(self, key):
    next = self._OrderedDict__map[key][1]
    if next is self._OrderedDict__root:
      raise ValueError("{!r} is the last key".format(key))
    return next[2]
  
  def first_key(self):
    for key in self: return key
    raise ValueError("OrderedDict() is empty")