#include <iostream>
#include <string>
#include <cctype>
using namespace std;

bool isBFCommand(char c) {
	return c == '>' || c == '<' ||
	       c == '+' || c == '-' ||
	       c == '.' || c == ',' ||
	       c == '[' || c == ']';
}
 
string stringToBrainfuck(const string& s) {
        string res;
        int dpValue = 0;
 
        //ideone still has trouble with range based for?
        for(auto it = s.begin(); it != s.end(); ++it) { 
                char c = *it;
 
                int distance  = (c > dpValue) ? (c - dpValue) : (dpValue - c);
                int direction = (c > dpValue) ? +1 : -1;
 
                if(distance > 127) {
                        distance = 256 - distance;
                        direction *= -1;
                }
 
                res += (!isBFCommand(c) && isprint(c)) ? c : ' ';
		res += " " + string(distance, ((direction == +1) ? '+' : '-') )
		       + ".\n";
                dpValue = c;
        }
        return res;
}
 
string fetchInput() {
        string ret, line;
        while(getline(cin, line))
                ret += line + '\n';
        return ret;
}
 
int main() {
        cout << stringToBrainfuck( fetchInput() ) << "\n";
}