It is known that AA+A=XYZ. What is the last digit of the product: B×C×D×D×C×E×F×G (where different letters denote different digits, identical letters denote identical digits)?