#!/bin/bash
s='a chair x 0 y
a table x 0 y
a window x 0 y
a computer x 0 y'

sed -E 's/^(\S+\s+window\s+\S+\s+)0(\s)/\1111\2/'  <<< "$s"