/*import java.util.*;
class Wallet {
    protected double balance;
    public void add(double amount) {
        balance += amount;
    }

    public void pay(double amount) {
        balance -= amount;
    }

    public double getBalance() {
        return balance;
    }
}

class BitcoinWallet extends Wallet {}
class CreditCardWallet extends Wallet {}
class PayPalWallet extends Wallet {}

public class Main3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = Integer.parseInt(sc.nextLine());

        BitcoinWallet bitcoin = new BitcoinWallet();
        CreditCardWallet credit = new CreditCardWallet();
        PayPalWallet paypal = new PayPalWallet();

        for (int i = 0; i < t; i++) {
            String[] parts = sc.nextLine().split(" ");
            if (parts.length != 3) {
                System.out.println("Invalid input");
                return;
            }

            String walletType = parts[0];
            String transType = parts[1];
            double amount = Double.parseDouble(parts[2]);

            if (amount < 0) {
                System.out.println("-1");
                return;
            }

            Wallet wallet;
            switch (walletType) {
                case "BitcoinWallet": wallet = bitcoin; break;
                case "CreditCardWallet": wallet = credit; break;
                case "PayPalWallet": wallet = paypal; break;
                default: System.out.println("Invalid input"); return;
            }

            if (transType.equals("add")) wallet.add(amount);
            else if (transType.equals("pay")) wallet.pay(amount);
            else {
                System.out.println("Invalid input");
                return;
            }
        }

        System.out.printf("%.2f\n", bitcoin.getBalance());
        System.out.printf("%.2f\n", credit.getBalance());
        System.out.printf("%.2f\n", paypal.getBalance());

        sc.close();
    }
}
*/

import java.util.Scanner;
class wallet{
    int transaction;
    String type;
    String operation;
    float amount;
}
class BitcoinWallet extends wallet{
    void bitcoinwallet(double bc){
        float balance=0.00;
        System.out.println(balance);
    }
}
class CreditCardWallet extends wallet{
    float balance=0;
    void creditcardwallet(double cc){
        balance= balance+amount;
        System.out.println(balance);
    }
}
class PayPalWallet extends wallet{
    void paypalwallet(double pp){
    float add=0.00;
        System.out.println(add);
    }
}
public class Main{
    public static void main(String[]args){
        Scanner sc=new Scanner(System.in);
        BitcoinWallet bw=new BitcoinWallet();
        CreditCardWallet cw=new CreditCardWallet();
        PayPalWallet pw=new PayPalWallet();
        for(int i=0;i<transaction;i++){
            if(type=="BitcoinWallet" || type=="CreditCardWallet" || type=="PayPalWallet")
            {
             if(type=="BitcoinWallet"){
                 bw.transaction=sc.nextInt();
                 bw.type=sc.nextLine();
                 bw.operation=sc.nextLine();
                 bw.amount=sc.nextDouble();
             }   
                
                
            }
            else{
                System.out.println("Invalid input");
            }
        bw.transaction=sc.nextInt();
        bw.type=sc.nextLine();
        bw.operation=sc.nextLine();
        bw.amount=sc.nextDouble();
        cw.transaction=sc.nextInt();
        cw.type=sc.nextLine();
        cw.operation=sc.nextLine();
        cw.amount=sc.nextDouble();
        pw.transaction=sc.nextInt();
        pw.type=sc.nextLine();
        pw.operation=sc.nextLine();
        pw.amount=sc.nextDouble();
            }
}
}


