```
if len(nums)==0:
return []
uniqueElem = []
nums.sort()
for i in range(len(nums)):
for j in range(i+1,len(nums)):
num1 = nums[i]
num2 = nums[j]
left = j+1
right = len(nums)-1
while left<right:
sum = num1+num2+nums[left]+nums[right]
temp = [num1,num2,nums[left],nums[right]]
temp.sort()
if sum==target:
if temp not in uniqueElem:
uniqueElem.append(temp)
right -= 1
left += 1
elif sum>target:
right -= 1
else:
left += 1
return uniqueElem
```