A{% for x in loop %}{% ifchanged %}{{ x }}{% else %}A{% endifchanged %}{% endfor %}