3. There are $n$ people, and it is known that any 2 of them have communicated at most once. Any $n-2$ of them have communicated the same number of times, which is equal to $3^{k}$ ($k$ is a positive integer). Find all possible values of $n$.