What is the output of the following Python code snippet?
class A:
__slots__ = ('x',)
a = A()
try:
a.y = 10
except AttributeError:
print('AttributeError')
__slots__ = ('x',)
a = A()
try:
a.y = 10
except AttributeError:
print('AttributeError')