------
## 最终结论
```python
def find_smallest_good_number(fronts, backs):
    # 初始化数据结构
    not_good_numbers = set()
    smallest_good_number = float('inf')

    # 找出所有不能作为好数的数字
    for front, back in zip(fronts, backs):
        if front == back:
            not_good_numbers.add(front)

    # 遍历所有可能的好数
    for front in fronts:
        if front not in not_good_numbers and front < smallest_good_number:
            smallest_good_number = front
            
    for back in backs:
        if back not in not_good_numbers and back < smallest_good_number:
            smallest_good_number = back

    # 返回结果
    return smallest_good_number if smallest_good_number != float('inf') else 0

# 示例用法
fronts = [1, 2, 4, 4, 7]
backs = [1, 3, 4, 1, 3]
print(find_smallest_good_number(fronts, backs))  # 输出: 2
```