Amr bin Shareed heard Abu Rafi say that he heard the Prophet ﷺ say, "The neighbor has the greatest right to what is adjacent to him."
حدثنا عبد الله بن محمد النفيلي حدثنا سفيان
سمع عمرو بن الشريد سمع أبا رافع سمع النبي ﷺ يقول الجار أحق بسقبه
Bukhari narrated it in Hiyal, chapter on gift and preemption, no. 6977, from the hadith of Sufyan bin Uyayna, through the same chain.