Implemented Stack task solver