# Author: http://stackoverflow.com/users/1679849
#
# Create an SVG gear object based on three input parameters (provided
# via stdin):
#
# - number of teeth
# - mean radius (average radius between top & bottom of teeth)
# - tooth size (height of teeth from top to bottom)
#
# Note: to create gears that mesh correctly, always use the same
# tooth size, and ensure that the ratio of the number of teeth to
# the mean radius is constant. For example:
#
# 1: nteeth = 24, rmean = 45, tsize = 5
# 2: nteeth = 16, rmean = 30, tsize = 5
#
# Outputs an SVG <path> element with up to 2 decimal places per point,
# but you can edit this setting if you like:
decimalplaces = 2
from math import (sin,cos,pi)
def formatnum(floatnum):
s = ('%.'+str(decimalplaces)+'f') % floatnum
s = s.rstrip('0').rstrip('.')
if s == '-0':
s = '0'
return s
def gear(nteeth,rmean,tsize):
dr = tsize * 0.1
rmin = rmean - tsize * 0.5
rmax = rmean + tsize * 0.5
rads = [rmin,rmin+dr,rmax-dr,rmax,rmax,rmax-dr,rmin+dr,rmin]
nt8 = nteeth * 8
o = ''
for theta in range(nt8):
r = rads[theta % 8]
x = sin(theta * 2 * pi / nt8) * r
y = cos(theta * 2 * pi / nt8) * r
o = o + formatnum(x) + ' ' + formatnum(y) + ' '
return o.strip().replace(' -','-')
nt = input()
rm = input()
ts = input()
print '<path d="M' + gear(nt,rm,ts) + 'z" />'
IyBBdXRob3I6IGh0dHA6Ly9zdGFja292ZXJmbG93LmNvbS91c2Vycy8xNjc5ODQ5CiMKIyBDcmVhdGUgYW4gU1ZHIGdlYXIgb2JqZWN0IGJhc2VkIG9uIHRocmVlIGlucHV0IHBhcmFtZXRlcnMgKHByb3ZpZGVkCiMgdmlhIHN0ZGluKToKIwojICAtIG51bWJlciBvZiB0ZWV0aAojICAtIG1lYW4gcmFkaXVzIChhdmVyYWdlIHJhZGl1cyBiZXR3ZWVuIHRvcCAmIGJvdHRvbSBvZiB0ZWV0aCkKIyAgLSB0b290aCBzaXplIChoZWlnaHQgb2YgdGVldGggZnJvbSB0b3AgdG8gYm90dG9tKQojCiMgTm90ZTogdG8gY3JlYXRlI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0gc2luKHRoZXRhICogMiAqIHBpIC8gbnQ4KSAqIHIKICAgICAgICB5ID0gY29zKHRoZXRhICogMiAqIHBpIC8gbnQ4KSAqIHIKICAgICAgICBvID0gbyArIGZvcm1hdG51bSh4KSArICcgJyArIGZvcm1hdG51bSh5KSArICcgJwogICAgcmV0dXJuIG8uc3RyaXAoKS5yZXBsYWNlKCcgLScsJy0nKQoKbnQgPSBpbnB1dCgpCnJtID0gaW5wdXQoKQp0cyA9IGlucHV0KCkKcHJpbnQgJzxwYXRoIGQ9Ik0nICsgZ2VhcihudCxybSx0cykgKyAneiIgLz4nCg==