def decrypt(ciphertext, cipher, shift):
    """
    Caesar decryption of a ciphertext using a shifted cipher.

    :param ciphertext: the encrypted plaintext to decrypt.
    :param cipher: set of characters, shifted in a directed to used for character substitution.
    :param shift: offset to rotate cipher.
    :returns: decrypted cyphertext (plaintext).

    See: https://en.wikipedia.org/wiki/Caesar_cipher
    Example:

    >>> decrypt("gdkknzvnqkc", "abcdefghijklmnopqrstuvwxyz ", 1)
    'hello world'
    >>> decrypt("ifmmpaxpsme", "abcdefghijklmnopqrstuvwxyz ", -1)
    'hello world'
    """
    # calculating shifted cipher
    shifted_cipher = cipher
    if shift > 0:
        while shift > 0:
            shifted_cipher = shifted_cipher[-1] + shifted_cipher[0:len(shifted_cipher) - 1]
            shift -= 1
    else:
        while shift < 0:
            shifted_cipher = shifted_cipher[1:] + shifted_cipher[0]
            shift += 1

    return "".join([cipher[shifted_cipher.index(character)] for character in ciphertext])