human
I found an interesting problem on https://www.codewars.com/kata/5868a68ba44cfc763e00008d:
# Esolang Interpreters #3 - Custom Paintfuck Interpreter

## About this Kata Series

"Esolang Interpreters" is a Kata Series that originally began as three separate, independent esolang interpreter Kata authored by [@donaldsebleung](http://codewars.com/users/donaldsebleung) which all shared a similar format and were all somewhat inter-related.  Under the influence of [a fellow Codewarrior](https://www.codewars.com/users/nickkwest), these three high-level inter-related Kata gradually evolved into what is known today as the "Esolang Interpreters" series.

This series is a high-level Kata Series designed to challenge the minds of bright and daring programmers by implementing interpreters for various [esoteric programming languages/Esolangs](http://esolangs.org), mainly [Brainfuck](http://esolangs.org/wiki/Brainfuck) derivatives but not limited to them, given a certain specification for a certain Esolang.  Perhaps the only exception to this rule is the very first Kata in this Series which is intended as an introduction/taster to the world of esoteric programming languages and writing interpreters for them.

## The Language

Paintfuck is a [borderline-esoteric programming language/Esolang](http://esolangs.org) which is a derivative of [Smallfuck](http://esolangs.org/wiki/Smallfuck) (itself a derivative of the famous [Brainfuck](http://esolangs.org/wiki/Brainfuck)) that uses a two-dimensional data grid instead of a one-dimensional tape.

Valid commands in Paintfuck include:

- `n` - Move data pointer north (up)
- `e` - Move data pointer east (right)
- `s` - Move data pointer south (down)
- `w` - Move data pointer west (left)
- `*` - Flip the bit at the current cell (same as in Smallfuck)
- `[` - Jump past matching `]` if bit under current pointer is `0` (same as in Smallfuck)
- `]` - Jump back to the matching `[` (if bit under current pointer is nonzero) (same as in Smallfuck)

The specification states that any non-command character (i.e. any character other than those mentioned above) should simply be ignored. ...

I tried it in Python, but could not do it. Can you solve it?

 ... Here inter-related?
assistant
#Here inter-related.

def interpreter(code, iterations, width, height):
    inter = Inter(code, width, height)
    inter.run(iterations)
    return '\r\n'.join(''.join(map(str, e)) for e in inter.grid)
    
class Inter:
    _instruct = { 'w':'moveW', 'e':'moveE', 'n':'moveN', 's':'moveS', '*':'flip', '[':'jumpP', ']':'jumpB'} 
    _nonC = lambda x:None
    def __init__(self, code, w, h):
        self.grid = [[0]*w for e in range(h)]
        self.com  = code
        self.w, self.h  = w, h
        self.x, self.y  = 0, 0
        self.i, self.it = 0, 0
        
    def countIteration(f):
        def wrap(cls):
            cls.it += 1
            return f(cls)
        return wrap
    
    def run(self, iterat):
        while self.it < iterat and self.i < len(self.com):#
            getattr(self, self._instruct.get(self.com[self.i],'_nonC'))()
            self.i += 1
        
    @countIteration
    def moveE(self):
        self.x = (self.x + 1)%self.w
    
    @countIteration
    def moveW(self):
        self.x = (self.x - 1)%self.w
        
    @countIteration
    def moveN(self):
        self.y = (self.y - 1)%self.h
        
    @countIteration
    def moveS(self):
        self.y = (self.y + 1)%self.h
    
    @countIteration
    def flip(self):
        self.grid[self.y][self.x] = int(not(self.grid[self.y][self.x]))
    
    @countIteration
    def jumpP(self):
        if self.grid[self.y][self.x] == 0:
            self._jump(1,  ']', '[')
    
    @countIteration
    def jumpB(self):
        if self.grid[self.y][self.x] == 1:
            self._jump(-1, '[', ']')
        
    def _jump(self, way, need, past, nest = 0):
        while way:
            self.i += way
            if self.com[self.i] == need and not nest: break
            if self.com[self.i] == need and nest: nest -= 1
            if self.com[self.i] == past: nest += 1