import qualified Data.ByteString.Char8 as B
import Data.Maybe
main=putStrLn.solve.map(fst.fromJust.B.readInt).B.words=<<B.getLine
solve(x:a:b:_)
 |a>=b="delicious"
 |x>=b-a="safe"
 |otherwise="dangerous"