<｜begin▁of▁sentence｜>### Instruction:
Given a graph with 10 vertices labeled from 'a' to 'j' and edges connecting them in a certain pattern, can you use the community_leading_eigenvector function of igraph to detect community structure using Newman's leading eigenvector method? Print the community membership for each vertex.
### Response:
import igraph as ig

# Create a graph
vertices = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
edges = [(0, 1), (1, 2), (2, 3), (3, 4), (4, 0), (5, 6), (6, 7), (7, 8), (8, 9), (9, 5), (0, 5), (1, 6), (2, 7), (3, 8), (4, 9)]
g = ig.Graph(vertex_attrs={'label': vertices}, edges=edges)

# Find communities using leading eigenvector method
communities = g.community_leading_eigenvector()

# Print the membership of each node
g.vs['community'] = communities.membership
print(g.vs['label'], g.vs['community'])
<|EOT|>
