A Chance Arrangement

Given by Brynjolf, who is at the town square in Riften, this is the first quest to join the thieves guild.

Background
"Brynjolf in Riften seems to be involved in some nefarious activities and has convinced me to take part in one of his schemes."

Objectives

 * Meet Brynjolf during daytime.
 * Steal Madesi's ring.
 * Plant Madesi's ring on Brand-Shei.
 * Speak to Brynjolf.

Bugs

 * If you leave the town while Brand-Shei is being arrested, the ring will be taken from his inventory by a guard and the distraction by Brynjolf will continue on, making it impossible to join the Thieves Guild. The quest lines also change to "Taking Care of Business" with the Objective as : Locate Brynjolf at the Ragged Flagon, which makes the quest in-completable which in turn makes it unable to join the Thieves Guild.
 * After stealing the ring and placing it on Brand-Shei's persons, sometimes the distraction Brynjolf provided will not end. This can happen if you speak to Brynjolf after planting the ring. To avoid this glitch, wait for Brynjolf to approach and start a dialog with your character after planting the ring.
 * The only way to end it and move forward is to get caught stealing something from the market. This will fail the quest, but will allow you to get past this glitch, just speak to Brynjolf and he will give you another chance to join the thieves guild.
 * You can also fast travel to end the quest so as not to lose all of your stolen items. You will still be able to join after.
 * Sometimes Madesi's strongbox doesn't have the ring in it. Going away and coming back should fix this issue.
 * It's HIGHLY recommended to finish Brand-Shei's quest before this one. If you finish this quest while still having Brand-Shei's quest active, it will result in not being able to finish it, due to Brand-Shei being in jail.
 * This quest can still be completed if Brand-Shei has been jailed after completing "A Chance Arrangement." Simply make his quest the active quest, re-enter the dungeon, and speak with Brand-Shei. If this doesn't work, the quest can be completed by using console console command: open the console, target Brand-Shei (or try prid 19ddc, then type setrelationshiprank player 1 and try to speak to him again.
 * If you tell Brynjolf to start the distraction at night no one will move or talk even though the quest is completed, Also when going into the Ratways, the lowlife will be fighting Brynjolf and you will have to wait for him the walk into the ragged flagon. After accepting the quest to collect the debts, Brynjolf will be in the stalls STILL doing the distraction. This is not fixed by being caught stealing.
 * Attacking Brynjolf and causing him to go down on one knee may fix the bug.
 * Alternitively you can also steal a Silver Ring(regular) from Madesi's display case and plant that in his pocket to proceeed with the quest. Whether or not you get gold or not is unknown as of now.