Context: Dumfries and Galloway is one of 32 unitary council areas of Scotland and is located in the western Southern Uplands. It comprises the historic counties of Dumfriesshire, Stewartry of Kirkcudbright and Wigtownshire, the latter two of which are collectively known as Galloway. The administrative centre is the town of Dumfries., A royal burgh was a type of Scottish burgh which had been founded by, or subsequently granted, a royal charter. Although abolished in law in 1975, the term is still used by many former royal burghs., Dumfriesshire or the County of Dumfries ("Siorrachd Dhùn Phris" in Gaelic) is lieutenancy area and historic county of Scotland., Samuel Pepys (; 23 February 1633  26 May 1703) was an administrator of the navy of England and Member of Parliament who is most famous for the diary that he kept for a decade while still a relatively young man. Pepys had no maritime experience, but he rose to be the Chief Secretary to the Admiralty under both King Charles II and King James II through patronage, hard work, and his talent for administration. His influence and reforms at the Admiralty were important in the early professionalisation of the Royal Navy., Dumfries (; possibly from ) is a market town and former royal burgh within the Dumfries and Galloway council area of Scotland. It is near the mouth of the River Nith into the Solway Firth. Dumfries was a civil parish and became the county town of the former county of Dumfriesshire. Dumfries is nicknamed "Queen of the South". People from Dumfries are known colloquially as "Doonhamers"., `` Tam o ' Shanter '' is a narrative poem written by the Scottish poet Robert Burns in 1790 , while living in Dumfries . First published in 1791 , it is one of Burns ' longer poems , and employs a mixture of Scots and English . The poem describes the habits of Tam , a farmer who often gets drunk with his friends in a public house in the Scottish town of Ayr , and his thoughtless ways , specifically towards his wife , who is waiting at home for him , angry . At the conclusion of one such late - night revel after a market day , Tam rides home on his horse Meg while a storm is brewing . On the way he sees the local haunted church lit up , with witches and warlocks dancing and the devil playing the bagpipes . He is still drunk , still upon his horse , just on the edge of the light , watching , amazed to see the place bedecked with many gruesome things such as gibbet irons and knives that had been used to commit murders and other macabre artifacts . The witches are dancing as the music intensifies and , upon seeing one particularly wanton witch in a short dress he loses his reason and shouts , ` Weel done , cutty - sark ! ' ( cutty - sark : `` short shirt '' ) . Immediately , the lights go out , the music and dancing stops and many of the creatures lunge after Tam , with the witches leading . Tam spurs Meg to turn and flee and drives the horse on towards the River Doon as the creatures dare not cross a running stream . The creatures give chase and the witches come so close to catching Tam and Meg that they pull Meg 's tail off just as she reaches the Brig o ' Doon ., A pub, or public house, is an establishment licensed to sell alcoholic drinks, which traditionally include beer, ale and other brewed alcoholic drinks. It is a relaxed, social drinking establishment and a prominent part of British culture, Irish culture, New Zealand culture and Australian culture. In many places, especially in villages, a pub is the focal point of the community. In his 17th century diary Samuel Pepys described the pub as "the heart of England.", Scots is the Germanic language variety spoken in Lowland Scotland and parts of Ulster (where the local dialect is known as Ulster Scots). It is sometimes called Lowland Scots to distinguish it from Scottish Gaelic, the Celtic language which was historically restricted to most of the Highlands, the Hebrides and Galloway after the 1500s. The language developed during the Middle English period as a distinct entity., Ayrshire is a historic county in south-west Scotland, located on the shores of the Firth of Clyde. 
It is also, under the name the County of Ayr, a registration county. Its principal towns include Ayr, Kilmarnock and Irvine. Like the other counties of Scotland, it currently has no administrative function, instead being sub-divided into the council areas of North Ayrshire, South Ayrshire and East Ayrshire. It has a population of approximately 366,800., Market town or market right is a legal term, originating in the Middle Ages, for a European settlement that has the right to host markets, distinguishing it from a village and city. A town may be correctly described as a "market town" or as having "market rights", even if it no longer holds a market, provided the legal right to do so still exists., A County town is usually the location of administrative or judicial functions within the county, or it has been established over time as the "de facto" main town of a county. The concept of a county town eventually became detached from its original meaning of where the county administration or county hall is based. In fact, many county towns are no longer part of the administrative county. For example, Nottingham is administered by a unitary authority entirely separate from the rest of Nottinghamshire. Many county towns are classified as cities, but all are referred to as county towns regardless of whether city status is held or not., The Solway Firth is a firth that forms part of the border between England and Scotland, between Cumbria (including the Solway Plain) and Dumfries and Galloway. It stretches from St Bees Head, just south of Whitehaven in Cumbria, to the Mull of Galloway, on the western end of Dumfries and Galloway. The Isle of Man is also very near to the firth. The firth comprises part of the Irish Sea., Ayr ("Mouth of the River Ayr") is a large town and former Royal Burgh situated on the west coast of Ayrshire in Scotland, United Kingdom. It is the administrative centre of the South Ayrshire Council area and historical county town of Ayrshire. Ayr is currently the most populated settlement in Ayrshire and is the 12th most populous settlement in Scotland. Ayr adjoins the smaller town of Prestwick to the north, forming a single continuous urban area with the town., The River Nith is a river in South West Scotland., Robert Burns (25 January 175921 July 1796), also known as Rabbie Burns, the Bard of Ayrshire, Ploughman Poet and various other names and epithets, was a Scottish poet and lyricist. He is widely regarded as the national poet of Scotland and is celebrated worldwide. He is the best known of the poets who have written in the Scots language, although much of his writing is also in English and a light Scots dialect, accessible to an audience beyond Scotland. He also wrote in standard English, and in these writings his political or civil commentary is often at its bluntest., Subject: tam o' shanter , Relation: instance_of, Options: (A) 1975 (B) 25 (C) administration (D) administrative centre (E) area (F) border (G) city (H) civil parish (I) coast (J) concept (K) council (L) council area (M) county (N) dialect (O) england (P) firth (Q) hall (R) july (S) language (T) law (U) location (V) market (W) market right (X) may (Y) name (Z) part ([) population (\) rights (]) river (^) royal burgh (_) scottish (`) settlement (a) standard (b) town (c) two (d) unitary authority (e) urban area (f) variety (g) work (h) writing
Output: work