Their
      father left behind haraam money
Question

                A muslim man had invested (buy shares)in company dealing with alcohol. 
He then made some profit by selling the shares. Some years later he died. 
His children realise that what their father did was wrong. What can his children do.Can they sadaqa or donate for the public use(build roads, mosque, madrasah etc)with the money that their father made profit from selling the shares.
If all the money has been used, can his children use their own money to donate for the public.
Praise be to Allah.One of the
      duties which the children owe to their father is to give the money which
      he earned from selling these shares to something which will be of public
      benefit, such as building roads, schools and other facilities. But it
      should not be used to buy food for them or for others – to be on the
      safe side – and it should not be used to build a mosque. By paying out
      this money they will clear their father of sin, but this will not bring
      them closer to Allaah, because Allaah is good and only accepts that which
      is good. 
 Whether
      they pay the exact same money or an equivalent amount from their own
      wealth, it is OK, because the prohibition has to do with how it was
      earned, not the currency itself. If they pay an amount equal to that which
      was earned, this will be sufficient.
 Ibn
      al-Qayyim (may Allaah have mercy on him) said concerning a principle which
      he mentioned about mixing permissible things with forbidden things: “…
      there are two kinds of this. The first is when the forbidden thing is
      haraam in and of itself, such as blood and urine… The second is when it
      is haraam in the way in which it was earned, not because it is haraam in
      and of itself, such as money that is taken by force. This second kind does
      not necessitate avoiding that which is halaal or prohibiting it in
      totality. If his money is mixed with haraam money, or is mostly haraam, he
      should take out the haraam amount, then the rest becomes permissible for
      him with no sense of it being makrooh, regardless of whether what he takes
      out is the exact same money that he earned in a haraam manner or is an
      equivalent amount, because its being haraam does not have to do with the
      essence of the money itself; it has to do with the way in which it was
      earned.