/*
-------関数一覧--------
arr1dto2d(Array) 一次元配列を二次元配列にします
pf(N)素因数分解した結果をオブジェクトで返します
gcd(a,b)最大公約数を返します
lcm(a,b)最小公倍数を返します
num(a,b)a-bを返します。ソート用です
isPrime(n)素数かどうか真偽値で返します
isNumber(n)数かどうか真偽値で返します
arrsum(arr)配列の合計値を返します
nibu(arr,n)n以下で最も大きい数の添字を返します(nを含みます)
br(input)入力を改行で区切ります
*/
const debugMode = false;
const inf = Number.MAX_SAFE_INTEGER;
const mod = 1000000007;
function Main(input){
  input = input.split(" ");
  console.log(input[0]*input[1]);
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
function zisyozyunn(a){
  var arr = [];
  for(var i=0;i<input[0];i++){
    arr.push(i+1);
  }
  var sum = 0;
  for(var i=0;i<a.length;i++){
    var f = arr.findIndex(val => val==a[i]);
    sum += factorialize(a.length-1-i)*f;
    arr.splice(f,1);
  }
  return sum;
}
function arrsum(arr){
  var sum = 0;
  for (var i=0,len=arr.length; i<len; ++i) {
      sum += arr[i]-0;
  };
  return sum;
}
function debug(val){
  if(debugMode==true){
    console.log(val)
  }
}
function arrMaxPoint(arr){
	var max = Number.MIN_SAFE_INTEGER;
	var point = -1;
	for(var i=0;i<arr.length;i++){
		if(max<arr[i]){
			max = arr[i];
			point = i;
		}
	}
	return point;
}
function arrMinPoint(arr){
	var min = Number.MAX_SAFE_INTEGER;
	var point = -1;
	for(var i=0;i<arr.length;i++){
		if(min>arr[i]){
			min = arr[i];
			point = i;
		}
	}
	return point;
}
function arr1dto2d(arr){
	for(var i=0;i<arr.length;i++){
		arr[i]=arr[i].split("");
		}
	return arr;
}
function isPrime(n){
    if(false===Number.isInteger(n)){
        return false;
    }
    if(n<=1){
        return false;
    }
    if(2===n){
        return true;
    }
    if(0===n%2){
        return false;
    }
    var square_root = Math.floor(Math.sqrt(n));
    for(var i=3; i<=square_root; i+=2){
        if(0===n%i){
            return false;
        }
    }
    return true;
}
function isNumber(val){
	const pat = /^([1-9]\d*|0)$/;
	return pat.test(val);
}

function factorialize(num) {
  if (num === 0) { return 1; }
  return num * factorialize(num-1);
}
function rotate(array) {
  const ROW = array.length;
  const COL = array[0].length;
  const row = ROW-1;
  var a = new Array(COL);
  for (var c=0; c<COL; c++) {
    a[c] = new Array(ROW);
    for (var r=0; r<ROW; r++) {
      a[c][r] = array[row-r][c];
    }
  }
  return a;
}
function part_in(base,push,st){
	for(var i=st,p=0;p<push.length;i++,p++){
		base[i] = push[p];
	}
	return base;
}
function part_reverse(arr,s,g){
	var push = arr.slice(s-1,g);
  push.reverse();
	arr = part_in(arr,push,s-1);
	return arr;
}
function zeroPadding(num,length){
    return (num + '000000000000000000000000000000000').slice(0,length);
}
function arrsum(arr){
    var sum = 0;
    for (var i=0,len=arr.length; i<len; ++i) {
        sum += arr[i]-0;
    };
    return sum;
}
function pf(n) {
    var result = {};

    if (n === 1) {
        return {"1":1}
    }

    var init = 2;

    while (n !== 1) {
        var i = init;
        while (i < Number.MAX_SAFE_INTEGER) {
            if (n % i === 0) {
                n /= i;
                if (!(result[i] > 0)) {
                    result[i] = 0;
                }
                result[i]++;
                break;
            }
            i++;
        }
        init = i;
    }
    return result;
}
function gcd(a, b) {
    if (b === 0){
        return a
    }
    return gcd(b, a % b)
}
function lcm(a,b) {
    var g = (n, m) => m ? g(m, n % m) : n
    return a * b / g(a, b)
}
function num(a, b) {
  return a - b;
}
function nibu(a,searchValue){
	var index = -1;

//調べる左端を表す添字(index)
var left = 0;

//調べる右端を表す添字(index)
var right = a.length-1;

//左端と右端にデータがある間は処理を繰り返す
while(left <= right){

    //左右の真ん中を表す添字(index)
    middle =Math.floor((left +right)/2);

    //真ん中の値と探す値を比較する
    if(a[middle]==searchValue){
        //一致した場合、変数に入れて処理終了
        index = middle;
        break;
    }else if(a[middle]<searchValue){
        //探す値より小さい場合、左側にはもっと小さい値しかないので左端の値を真ん中の値の右に移動する
        left = middle +1;
    }else{
        //探す値より大きい場合、右側にはもっと大きい値しかないので右端の値を真ん中の値の左に移動する
        right = middle -1;
    }
}
if(index!=-1) return index;
else return left;
}
function br(input){
  return input.split("\n");
}
function is_sortred(arr){
  var flag = true;
  for(var i=1;i<arr.length;i++){
    if(arr[i-1]>arr[i]){
      flag = false;
      break;
    }
  }
  return flag;
}
function primeFactorization(n) {

	// 平方根を保存
	var s = Math.floor(Math.sqrt(n));

	var r = 0;

	var result = {};

	// 2から平方根までの素因数を求める
	for (var i = 2;i <= s;i++) {

		if ((n % i) == 0) {

			r = 0; // 指数カウンタクリア

			do {

				r++; // 指数カウンタプラス

				n = n / i;

			} while ((n % i) == 0);

			// 素因数iを指数とともに保存
			result[i]=r;

		}

	}

	// 残った素数を追加
	if (n > s) {
		result[n] = 1;
	}

	return result;

}


function Main(input) {
  input = input.split("\n");
  const A = parseInt(input[0].split(" ")[0]);
  const B = parseInt(input[0].split(" ")[1]);

  console.log(A * B);

// デバッグ用
function debug() {
  var input = document.getElementById("input").value;
  Main(input);
}

//* この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
reader.on('line', (line) => {
    lines.push(line);
});
reader.on('close', () => {
    var input_int = parseInt(lines);
    console.log(lines[0] * lines[1]);
});


function main(input) {
    const strNumbers = input.split(" ");
    const a = strNumbers[0];
    const b = hundredTimesNormalization(strNumbers[1]);

    const result = Math.floor((a * b)/100);
    console.log(result);
}

const hundredTimesNormalization = (org) => {
    const [integer, decimal] = org.split('\.');
    const normalizationDecimal = ((typeof decimal == 'undefined' ? "" : decimal) + "0".repeat(2)).slice(0, 2);
    return ( Number( integer + normalizationDecimal));
}

// let input = "198 1.10";
// let input = "1 0.01";
// let input = "1000000000000000 9.99";
// let input = "0.07 100";
// let input = "1000000000000000 9.95";
// let input = "1 2.345"
// main(input);
main(require("fs").readFileSync("/dev/stdin","utf8"));

data.map(d => (d.date = new Date(d3.median(d, d => d.date)), d))


package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	fmt.Println(a * b)
}


package main

import (
	"bufio"
	"fmt"
	"io"
	"log"
	"os"
	"strconv"
)

func main() {
	fmt.Println(readInt() * readInt())
}

var (
	readString func() string
	readBytes  func() []byte
)

func init() {
	log.SetFlags(log.Lshortfile)
	readString, readBytes = newReadString(os.Stdin)
}

func newReadString(ior io.Reader) (func() string, func() []byte) {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	f1 := func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
	f2 := func() []byte {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Bytes()
	}
	return f1, f2
}

func readInt64() int64 {
	i, err := strconv.ParseInt(readString(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readInt() int {
	return int(readInt64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(readString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func sum(a []int) int {
	var ret int
	for i := range a {
		ret += a[i]
	}
	return ret
}

func sumFloat64(a []float64) float64 {
	var ret float64
	for i := range a {
		ret += a[i]
	}
	return ret
}

func gcd(m, n int) int {
	for m%n != 0 {
		m, n = n, m%n
	}
	return n
}

func lcm(m, n int) int {
	return m / gcd(m, n) * n
}


package main

import (
  "fmt"
)

func main() {
  var a, b int
  fmt.Scan(&a, &b)
  fmt.Println(a * b)
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	var answer int64

	// N
	scanner.Scan()
	n, err := strconv.Atoi(scanner.Text())
	if err != nil {
		panic(err)
	}

	a := make([]int, n)

	for i := 0; i < n; i++ {
		scanner.Scan()
		num, err := strconv.Atoi(scanner.Text())
		if err != nil {
			panic(err)
		}
		a[i] = num
	}

	answer = int64(a[0])

	for i := 1; i < len(a); i++ {
		answer *= int64(a[i])
		if answer > int64(math.Pow(10, 18)) {
			fmt.Println("-1")
			os.Exit(1)
		}
	}

	fmt.Println(answer)

}


import sys

def log(s):
    # print("| " + str(s), file=sys.stderr)
    pass

def output(x):
    print(x, flush=True)

def input_ints():
    return list(map(int, input().split()))

def main():
    f = input_ints()
    print(f[0] * f[1])

main()


inputs = gets.strip.split.map(&:to_i)

puts inputs[0] * inputs[1]


a, b = gets.split.map(&:to_i)
puts a * b


ab = gets.chomp.split(" ").map!{|item| item.to_i}
puts ab[0] * ab[1]


n = gets.to_i
a = gets.split(" ").map(&:to_i)
i = 0
res = 1

while i < a.length do
  res = res * a[i]
  i += 1
end

if res > 10 ** 18
  puts "-1"
else
  puts res
end


a, b = gets.split(" ").map &:tp_i
puts a * b


use proconio::input;

fn main() {
    input!{
        a: i32,
        b: i32,
    };

    println!("{}", a * b);
}


use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
  let a: u32 = read();
  let b: u32 = read();
  let ans = a * b;
  println!("{}", ans);
}


use proconio::*;

fn main() {
    input! {
        a: i64,
        b: i64
    }

    println!("{}", a * b);
}


use std::io;

fn main(){
  let mut stdin = io::stdin();
  let mut buf = String::new();
  stdin.read_line(&mut buf).unwrap();
  buf.trim();
  let input = buf.split_whitespace().map(|n| n.parse::<u64>().unwrap()).collect::<Vec::<u64>>();
  println!("{}",input[0]*input[1]):
}


use std::io;
use std::str::FromStr;

fn main() {
    let stdin = io::stdin();
    let mut buf = String::new();
    stdin.read_line(&mut buf).ok();
    let mut it = buf.split_whitespace().map(|n| usize::from_str(n).unwrap());
    let (n, m) = (it.next().unwrap(), it.next().unwrap());
    println!("%d", n * m);
}


use std::io;

fn main() {
	let s = {
	    let mut s = String::new(); // バッファを確保
	    std::io::stdin().read_line(&mut s).unwrap(); // 一行読む。失敗を無視
	    s.trim_right().to_owned() // 改行コードが末尾にくっついてくるので削る
	};

	let (n, m) = {
	    let ws = s.split_whitespace(); // 空白区切りの単語に分解する
	    let n: i32 = ws.next().unwrap().parse().unwrap(); // イテレータから値を取り出して整数に
	    let m: i32 = ws.next().unwrap().parse().unwrap();
	    (n, m)
	};

	puts n * m;
}


let i = readInts()
print(i[0] * i[1])

// MARK: -----------------------------------------------------------------------

func readInts() -> [Int] {
    readLine()!.split(separator: " ").map { Int($0)! }
}

extension Collection {
    func mapToTuple() -> (Element, Element) {
        var i = makeIterator()
        return (i.next()!, i.next()!)
    }
    func mapToTuple() -> (Element, Element, Element) {
        var i = makeIterator()
        return (i.next()!, i.next()!, i.next()!)
    }
    func mapToTuple() -> (Element, Element, Element, Element) {
        var i = makeIterator()
        return (i.next()!, i.next()!, i.next()!, i.next()!)
    }

    subscript(gen: Index) -> Element {
        _modify { yield &self[index(gen, offsetBy: -1)] }
        _read   { yield self[index(gen, offsetBy: -1)] }
    }
}

struct DP<Argument: Hashable, Element> {
    var dictionary = [Argument: Element]()

    var expression: (Argument, (Argument) -> Element) -> Element

    init(expression: @escaping (_ argument: Argument, _ note: (Argument) -> Element) -> Element) {
        self.expression = expression
    }

    subscript(_ argument: Argument) -> Element {
        mutating get {
            if let note = dictionary[argument] {
                return note
            } else {
                let result = expression(argument) { self[$0] }
                dictionary[argument] = result
                return result
            }
        }
    }
}


let inputs = readLine()!.split(separator: " ").map { Int($0)! }
print(inputs[0] * inputs[1])


import Foundation
func toTuple<T>(_ args: [T]) -> (T, T) { (args[0], args[1]) }
func toTuple<T>(_ args: [T]) -> (T, T, T) { (args[0], args[1], args[2]) }
func toTuple<T>(_ args: [T]) -> (T, T, T, T) { (args[0], args[1], args[2], args[3]) }
func readInts() -> [Int] { readLine()!.split(separator: " ").map { Int($0)! } }
func readDoubles() -> [Double] { readLine()!.split(separator: " ").map { Double($0)! } }

let (a, b) = toTuple(readInts())
print(a * b)


var A = 10
var B = 5
print(A*B)


var A = 10
var B = 5
var C = A*B
print(C)


A = 10
B = 5
C = A*B
print(C)


import * as fs from 'fs';

const inputArray: string[] = fs.readFileSync("/dev/stdin", "utf8").split(' ');

const a: number = +inputArray[0];
const b: number = +inputArray[1];
const result = a * b;

console.log(result);


import { readFileSync } from "fs";

const input = readFileSync("/dev/stdin", "utf8").split("\n");

const [a, b] = input[0].split(" ").map(Number);

const answer = a * b;

console.log(answer);


/**
 * A × B を求めてください。
 */

export function Main(input: string) {
  // 問題文解体エリア
  const inputs = input.split(" ");
  const num1 = new Number(inputs[0]).valueOf();
  const num2 = new Number(inputs[1]).valueOf();

  // 問題解決エリア
  const answer = fuck(num1, num2);

  //出力エリア
  console.log(answer);
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
// 提出する時にコメントアウト解除せよ
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

export function fuck(num1: number, num2: number): number {
  return num1 * num2;
}


process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
reader.on('line', (line) => {
    lines.push(line);
});
reader.on('close', () => {
    var input_int = parseInt(lines);
    console.log(lines[0] * lines[1]);
});


l=input().split()
if l[0]==l[1]:
    print("H")
else:
    print("D")


a, b = list(input().split())
if a == b:
    print('H')
else:
    print('D')


ab = input().split()

if ab[0] == 'H':
    if ab[1] == 'H':
        print('H')
    else:
        print('D')
else:
    if ab[1] == 'H':
        print('D')
    else:
        print('H')


a,b = input().split()
print("H" if (a=="H" and b=="H") or (a=="D" and b=="H") else "D")


a, b = input().split()
if a == b:
  print('D')
else:
  print('H')


a,b = map(str,input().split())

if s == b:
  print("H")
else:
  print("D")


import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		char a = sc.next().toCharArray()[0];
		char b = sc.next().toCharArray()[0];

		if (a == 'H') {
			if (b == 'H') {
				System.out.println('H');
			} else {
				System.out.println('D');
			}
		} else {
			if (b == 'H') {
				System.out.println('D');
			} else {
				System.out.println('H');
			}
		}
	}

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
}


import java.io.*;
import java.util.*;

public class Main {
    public static PrintWriter out;
    public static FastScanner in;

    private void solve(){
        String a = in.next();
        String b = in.next();

        if(a.charAt(0) == b.charAt(0)|| a.charAt(0) == b.charAt(0)){
            out.print('H');
            return;
        }

        out.print('D');
    }

    private void runIO() {
        in = new FastScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));
        solve();
        out.close();
    }
    private static class FastScanner {
        BufferedReader bufferedReader;
        StringTokenizer stringTokenizer;

        private FastScanner() {
            bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        }

        private String next() {
            if (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {
                try {
                    stringTokenizer = new StringTokenizer(bufferedReader.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return stringTokenizer.nextToken();
        }

        private int nextInt() {
            return Integer.parseInt(next());
        }

        private long nextLong() {
            return Long.parseLong(next());
        }

        private String nextLine() {
            String ret = "";
            try {
                ret = bufferedReader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return ret;
        }
    }

    public static void main(String[] args) {
        new Main().runIO();
    }
}


import java.io.*;
import java.util.*;
class Main{
	static final long MOD = 1_000_000_007; // 10^9+7
    static final int MAX = 2_147_483_646; // intMax
    static final int INF = 1_000_000_000; // 10^9
    public static void main(String[] args) throws Exception {
		hayami saori = new hayami();
		String a = saori.nextHayami();
		String b = saori.nextHayami();
		if(a.equals("H") && b.equals("H")){
			System.out.println("H");
		}
		if(a.equals("H") && b.equals("D")){
			System.out.println("D");
		}
		if(a.equals("D") && b.equals("H")){
			System.out.println("D");
		}
		if(a.equals("D") && b.equals("D")){
			System.out.println("H");
		}

		saori.close();
    }
}

class hayami implements Closeable {
	private final InputStream in = System.in;
	private final byte[] hayami = new byte[1024];
	private int Hayami = 0;
	private int saori = 0;
	private boolean HayamiSaori() {
		if (Hayami < saori) {
			return true;
		}else{
			Hayami = 0;
			try {
				saori = in.read(hayami);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (saori <= 0) {
				return false;
			}
		}
		return true;
	}
	private int SaoriHayami() {
		if (HayamiSaori()) {
            return hayami[Hayami++];
         }else{
             return -1;
         }
	}
	private static boolean hayami_saori(int hayami) {
		return 33 <= hayami && hayami <= 126;
	}
	public boolean hayamisaori() {
		while(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();
	}
	public String nextHayami() {
		if (!hayamisaori()) throw new NoSuchElementException();
		StringBuilder hayamin = new StringBuilder();
		int saori = SaoriHayami();
		while(hayami_saori(saori)) {
			hayamin.appendCodePoint(saori);
			saori = SaoriHayami();
		}
		return hayamin.toString();
	}
	public long saorihayami() {//nextLong
		if (!hayamisaori()) throw new NoSuchElementException();
		long hayami = 0;
		boolean misao = false;
		int saori = SaoriHayami();
		if (saori == '-') {
			misao = true;
			saori = SaoriHayami();
		}
		if (saori < '0' || '9' < saori) {
			throw new NumberFormatException();
		}
		while(true){
			if ('0' <= saori && saori <= '9') {
				hayami *= 10;
				hayami += saori - '0';
			}else if(saori == -1 || !hayami_saori(saori)){
				return misao ? -hayami : hayami;
			}else{
				throw new NumberFormatException();
			}
			saori = SaoriHayami();
		}
	}
	public int saori_hayami() {//nextInt
		long hayami = saorihayami();
		if (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();
		return (int) hayami;
	}
	public double Hayamin() { //nextDouble
		return Double.parseDouble(nextHayami());
	}
	public void close() {
		try {
			in.close();
		} catch (IOException e) {
		}
    }

}


import java.util.*;
import java.io.*;
public class Main {
 static class Reader
 {
     final private int BUFFER_SIZE = 1 << 16;
     private DataInputStream din;
     private byte[] buffer;
     private int bufferPointer, bytesRead;

     public Reader()
     {
         din = new DataInputStream(System.in);
         buffer = new byte[BUFFER_SIZE];
         bufferPointer = bytesRead = 0;
     }

     public Reader(String file_name) throws IOException
     {
         din = new DataInputStream(new FileInputStream(file_name));
         buffer = new byte[BUFFER_SIZE];
         bufferPointer = bytesRead = 0;
     }

     public String readLine() throws IOException
     {
         byte[] buf = new byte[64]; // line length
         int cnt = 0, c;
         while ((c = read()) != -1)
         {
             if (c == '\n')
                 break;
             buf[cnt++] = (byte) c;
         }
         return new String(buf, 0, cnt);
     }

     public int nextInt() throws IOException
     {
         int ret = 0;
         byte c = read();
         while (c <= ' ')
             c = read();
         boolean neg = (c == '-');
         if (neg)
             c = read();
         do
         {
             ret = ret * 10 + c - '0';
         }  while ((c = read()) >= '0' && c <= '9');

         if (neg)
             return -ret;
         return ret;
     }

     public long nextLong() throws IOException
     {
         long ret = 0;
         byte c = read();
         while (c <= ' ')
             c = read();
         boolean neg = (c == '-');
         if (neg)
             c = read();
         do {
             ret = ret * 10 + c - '0';
         }
         while ((c = read()) >= '0' && c <= '9');
         if (neg)
             return -ret;
         return ret;
     }

     public double nextDouble() throws IOException
     {
         double ret = 0, div = 1;
         byte c = read();
         while (c <= ' ')
             c = read();
         boolean neg = (c == '-');
         if (neg)
             c = read();

         do {
             ret = ret * 10 + c - '0';
         }
         while ((c = read()) >= '0' && c <= '9');

         if (c == '.')
         {
             while ((c = read()) >= '0' && c <= '9')
             {
                 ret += (c - '0') / (div *= 10);
             }
         }

         if (neg)
             return -ret;
         return ret;
     }

     private void fillBuffer() throws IOException
     {
         bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
         if (bytesRead == -1)
             buffer[0] = -1;
     }

     private byte read() throws IOException
     {
         if (bufferPointer == bytesRead)
             fillBuffer();
         return buffer[bufferPointer++];
     }

     public void close() throws IOException
     {
         if (din == null)
             return;
         din.close();
     }
 }
	private static final int m = 0;
	public static void main(String[] args) throws Exception  {
Scanner  sc=new Scanner(System.in);
PrintWriter out=new PrintWriter(System.out);
char a=sc.next().charAt(0);
char b=sc.next().charAt(0);
if(a=='H'&&b=='H') {
	System.out.println('D');
}else if(a=='H'&&b=='D') {
	System.out.println('D');
}else if(a=='D'&&b=='D') {
	System.out.println('H');
}else if(a=='D'&&b=='H') {
	System.out.println('D');
}

	}
	}


import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();

		if(a.equals(b)){
		    System.out.println(b);
		}else{
		    String ans = "D";
		    System.out.println(ans);
		}
    }
}


import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();

    if(a == "D"){
      if(b.equals("H")) b = "D";
      else b = "H";
    }
    System.out.println(b);
  }
}


#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <map>
using namespace std;

char a, b;
bool flag;

int main(){
	scanf("%c %c", &a, &b);
	if(a == b) flag = 1;
	else flag = 0;
	if(flag == 1) printf("H\n");
	else printf("D\n");
}


#include <cstdio>
using namespace std;
char s1[4],s2[4];
int main(){
      scanf("%s%s",s1,s2);
      putchar(s1[0]==s2[0]?'H':'D');
}


#include<stdio.h>
int main()
{
    char a,b;
    scanf("%c %c",&a,&b);
    if(a=='H')
        printf("%c",b);
    else if(a=='D')
    {
        if(b=='H')
            printf("D");
        else if(b=='D')
           printf("H");
    }
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	string a,b;
	cin>>a>>b;
	if(a==b)
	{
		cout<<"H"<<endl;
	}
	else if(a=="H" && b=="D")
	{
		cout<<"H"<<endl;
	}
	else if(a=="D" && b=="H")
	{
		cout<<"H"<<endl;
	}
	else
	{
		cout<<"D";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	string a,b;
	cin>>a>>b;
	if(a==b)
	{
		cout<<"H"<<endl;
	}
	else if(a=="H" && b=="D")
	{
		cout<<"H"<<endl;
	}
	else
	{
		cout<<"D";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	string a,b;
	cin>>a>>b;
	if(a=="H" && b=="H")
	{
		cout<<"H"<<endl;
	}
	else if(a=="H" && b=="D")
	{
		cout<<"H"<<endl;
	}
	else
	{
		cout<<"D";
	}
	return 0;
}


#include<stdio.h>
#include<string.h>

int main(void)
{
  char a,b,dammy;
  scanf("%c%c%c",&a,&dammy,&b);
  if(a=='H')
    printf("%c\n",b);
  else if(b=='H')
    printf("D\n");
  else
    printf("H\n");
  return 0;
}


#include <stdio.h>

int main()
{
  char a,b;
  scanf("%c %c",&a,&b);
  if ((a == 'H' && b == 'H') || (a != 'H' && b != 'H'))
    printf("H");
  else
    printf("D");
}


#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,b;
    scanf("%c %c",&a,&b);
    if(a=='H')
        printf("%c",b);
        else
        {
            if(b=='H')
        printf("D");
        else
            printf("H");
        }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
    char a, b;
    cin >> a >> b;

    if (a == 'H') {
      if (b == 'H') {
        cout << "H" << endl;;
      } else {
        cout << "H" << endl;;
      }
    } else {
      if (b == 'H') {
          cout << "D" << endl;
      } else {
        cout << "H" << endl;;
      }
    }
}


#include <iostream>

using namespace std;

int main() {
    char a, b;
    cin >> a >> b;

    if (a == 'H') {
      if (b == 'H') {
        cout << "H" << endl;;
      } else {
        cout << "H" << endl;;
      }
    } else {
      if (b == 'H') {
          cout << "D" << endl;
      } else {
        cout << "H" << endl;;
      }
    }
}


#include <stdio.h>

int main(void)
{
        char s,t;
        scanf("%c%c",&s,&t);
        if(s=='H'){
                if(t=='H')printf("H\n");
                else if(t=='D')printf("D\n");
        }
        else {
                if(t=='H')printf("D\n");
                else if(t=='D')printf("H\n");
        }
        return 0;
}


"use strict";

const main = arg => {
    const a = arg.split("\n")[0].split(" ")[0];
    const b = arg.split("\n")[0].split(" ")[1];

    if(a=="D") {
        console.log(b == "H" ? "D" : "H");
    } else {
        console.log(b);
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


"use strict";
function Main(input){
	let xs = input.trim().split(' ')
    //console.log(xs[0],xs[1]);
    if(xs[0]=='D' && xs[1]=='D' || xs[0]=='H' && xs[1]=='H'){
    	console.log('H');
    } else {
    	console.log('D');
    }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));


function Main(input) {
  input=input.trim();
  var A = input.split(" ")[0];
  var B = input.split(" ")[1];
  if(A == "H"){
    console.log(B);
  }else{
    console.log((B === "H") ? "D" : "H");
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(input){
  const args = input.trim().split("");
  const a = args[0],
        b = args[1];

  if (a == b)
    console.log("H");
  else
    console.log("D");
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input){
  const args = input.split(" ");
  const a = args[0],
        b = args[1];

  if (a == b)
    console.log("H");
  else
    console.log("D");
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input){
  const args = input.split(" ");
  const a = args[0],
        b = args[1];

  if (a == "H")
    console.log(b);
  else
    if (b == "H")
      console.log("D");
    else
      console.log("H");
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

const (
	initialBufSize = 1e4
	maxBufSize     = 1e6 + 7
)

var buf []byte = make([]byte, maxBufSize)
var sc = bufio.NewScanner(os.Stdin)

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(buf, maxBufSize)
}

func main() {
	if nextLine() == nextLine() {
		fmt.Println("H")
	} else {
		fmt.Println("D")
	}
}

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func abs(a int) int {
	if a > 0 {
		return a
	} else {
		return -a
	}
}

func pow(p, q int) int {
	res := p
	if q == 0 {
		return 1
	}
	for i := 0; i < q-1; i++ {
		res *= p
	}
	return res
}

func MinOf(vars ...int) int {
	min := vars[0]
	for _, i := range vars {
		if min > i {
			min = i
		}
	}
	return min
}

func MaxOf(vars ...int) int {
	max := vars[0]
	for _, i := range vars {
		if max < i {
			max = i
		}
	}
	return max
}

func gcdof2numbers(a int, b int) int {
	if b == 0 {
		return a
	}
	return gcdof2numbers(b, a%b)
}

func lcmof2numbers(a int, b int) int {
	return a / gcdof2numbers(a, b) * b
}

// マイナスの場合は考慮していない
func fuctorial(a int) int {
	if a == 1 || a == 0 {
		return 1
	} else {
		return fuctorial(a-1) * a
	}
}

func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}

// 素因数分解したmapを返す
func primeFuctorize(n int) map[int]int {
	pf := map[int]int{}
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			pf[i]++
			n /= i
		}
	}
	if n != 1 {
		pf[n]++
	}
	return pf
}


package main

import (
	"fmt"
)

func main() {
	var a, b string
	fmt.Scan(&a, &b)
	if a == b {
		fmt.Println("H")
	} else {
		fmt.Println("D")
	}
}


package main

import "fmt"

func main() {
	var a, b string
	fmt.Scan(&a, &b)

	if a == "H" {
		if b == "H" {
			fmt.Println("H")
		} else {
			fmt.Println("D")
		}
	} else {
		if b == "H" {
			fmt.Println("D")
		} else {
			fmt.Println("H")
		}
	}
}


package main

import (
	"fmt"
)

func main() {
	var a, b string
	fmt.Scan(&a, &b)

  if a == b{
		println("H")
	} else {
		println("D")
	}
}


package main

import (
	"fmt"
)

// 以下の問題
// https://atcoder.jp/contests/abc056/tasks/abc056_a

func main() {
	var a, b string
	fmt.Scan(&a, &b)

	// if a == "H" {
	// 	if b == "H" {
	// 		fmt.Println("H")
	// 	} else {
	// 		fmt.Println("D")
	// 	}
	// } else {
	// 	if b == "H" {
	// 		fmt.Println("D")
	// 	} else {
	// 		fmt.Println("H")
	// 	}
	// }

	if a == b{
		println("H")
	} else {
		println("D")
	}
}


package main

import "fmt"

func main() {
	var a, b string
	fmt.Scan(&a, &b)
	s := "H"
	if a != b {
		fmt.Println("D")
	}
	fmt.Println(s)
}


a,b = gets.split; puts  a == b ? 'H' : 'D'


a, b = gets.split(" ")
if a == "H"
  puts b
else
  puts b == "H" ? "D" : "H"
end


ab = gets.chomp.split
a = ab[0]
b = ab[1]
case a
when "H"
    puts b == "H" ? "H" : "D"
when "D"
    puts b == "H" ? "D" : "H"
end


a, b = gets.chomp.split(" ")
puts a == "H" ? "H" : "D"


a, b = gets.chomp.split
ans = (a == "H" ^ b == "H") ? "D" : "H"

puts ans


a, b = gets.split
puts a == b ? : 'H' : 'D'


use std::cmp::*;
use std::io::*;
use std::num::*;
use std::str::*;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let s = stdin
        .bytes()
        .map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect::<String>();
    s.parse::<T>().ok().unwrap()
}

fn main() {
    let mut a: String = read();
    let mut b: String = read();
    let aa: bool = a.pop().unwrap() == 'H';
    let bb: bool = b.pop().unwrap() == 'H';
    println!("{}", if !aa ^ bb { "H" } else { "D" })
}


use std::io::*;
use std::str::FromStr;

pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let a: String = read();
    let b: String = read();
    let mut ans: String = "".to_string();
    if a == "H" {
        if b == "H" {
            ans = "H".to_string();
        } else {
            ans = "D".to_string();
        }
    } else {
        if b == "H" {
            ans = "D".to_string();
        } else {
            ans = "H".to_string();
        }
    }
    println!("{}", ans);
}


#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)]
use std::cmp::*;
use std::collections::*;
use std::mem::*;

fn main() {
    let (r, w, e) = (std::io::stdin(), std::io::stdout(), std::io::stderr());
    let mut io = IO::new(r.lock(), w.lock(), e.lock());
    assert_eq!(!0usize, std::usize::MAX); //🙊
    assert!(0 == 0); //😇

    let a = io.chars()[0];
    let b = io.chars()[0];

    let ans = (a == 'H') ^ (b != 'H');
    io.writeln(if ans { "H" } else { "D" });
}

static MX: usize = 1010101;
static MOD: i64 = 1000000007;
static INF: i64 = std::i64::MAX >> 1;
// IO
use std::io::*;
struct IO<R: Read, W: Write, E: Write> {
    Read: R,
    Write: BufWriter<W>,
    Error: BufWriter<E>,
}
impl<R: Read, W: Write, E: Write> IO<R, W, E> {
    fn new(r: R, w: W, e: E) -> IO<R, W, E> {
        IO {
            Read: r,
            Write: BufWriter::new(w),
            Error: BufWriter::new(e),
        }
    }
    fn read<T>(&mut self) -> T
    where
        T: std::str::FromStr,
    {
        let next: String = self
            .Read
            .by_ref()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect();
        next.parse().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
    fn chari(&mut self) -> Vec<i64> {
        self.chars()
            .iter()
            .map(|&c| (c as u8 - b'0') as i64)
            .collect::<Vec<i64>>()
    }
    fn readn<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read::<T>()).collect::<Vec<_>>()
    }
    fn readmat<T: std::str::FromStr>(&mut self, n: usize, m: usize) -> Vec<Vec<T>> {
        (0..n).map(|_| self.readn(m)).collect()
    }
    fn write<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
    }
    fn writeln<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
        self.Write.write(b"\n");
    }
    fn debug<S: std::fmt::Debug>(&mut self, val: S) {
        writeln!(self.Error, "(debug) {:?}", &val);
    }
    fn debug2<S: std::fmt::Debug, T: std::fmt::Debug>(&mut self, val1: S, val2: T) {
        writeln!(self.Error, "(debug2) {:?} -> {:?}", val1, val2);
    }
    fn debug3<S: std::fmt::Debug, T: std::fmt::Debug, U: std::fmt::Debug>(
        &mut self,
        val1: S,
        val2: T,
        val3: U,
    ) {
        writeln!(
            self.Error,
            "(debug3) {:?} -> {:?} -> {:?}",
            val1, val2, val3
        );
    }
}


#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)]
use std::cmp::*;
use std::collections::*;
use std::mem::*;

fn main() {
    let (r, w, e) = (std::io::stdin(), std::io::stdout(), std::io::stderr());
    let mut io = IO::new(r.lock(), w.lock(), e.lock());
    assert_eq!(!0usize, std::usize::MAX); //🙊
    assert!(0 == 0); //😇

    let a = io.read::<char>();
    let b = io.read::<char>();

    let ans = (a == 'H') ^ (b != 'H');
    io.writeln(if ans { "H" } else { "D" });
}

static MX: usize = 1010101;
static MOD: i64 = 1000000007;
static INF: i64 = std::i64::MAX >> 1;
// IO
use std::io::*;
struct IO<R: Read, W: Write, E: Write> {
    Read: R,
    Write: BufWriter<W>,
    Error: BufWriter<E>,
}
impl<R: Read, W: Write, E: Write> IO<R, W, E> {
    fn new(r: R, w: W, e: E) -> IO<R, W, E> {
        IO {
            Read: r,
            Write: BufWriter::new(w),
            Error: BufWriter::new(e),
        }
    }
    fn read<T>(&mut self) -> T
    where
        T: std::str::FromStr,
    {
        let next: String = self
            .Read
            .by_ref()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect();
        next.parse().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
    fn chari(&mut self) -> Vec<i64> {
        self.chars()
            .iter()
            .map(|&c| (c as u8 - b'0') as i64)
            .collect::<Vec<i64>>()
    }
    fn readn<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read::<T>()).collect::<Vec<_>>()
    }
    fn readmat<T: std::str::FromStr>(&mut self, n: usize, m: usize) -> Vec<Vec<T>> {
        (0..n).map(|_| self.readn(m)).collect()
    }
    fn write<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
    }
    fn writeln<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
        self.Write.write(b"\n");
    }
    fn debug<S: std::fmt::Debug>(&mut self, val: S) {
        writeln!(self.Error, "(debug) {:?}", &val);
    }
    fn debug2<S: std::fmt::Debug, T: std::fmt::Debug>(&mut self, val1: S, val2: T) {
        writeln!(self.Error, "(debug2) {:?} -> {:?}", val1, val2);
    }
    fn debug3<S: std::fmt::Debug, T: std::fmt::Debug, U: std::fmt::Debug>(
        &mut self,
        val1: S,
        val2: T,
        val3: U,
    ) {
        writeln!(
            self.Error,
            "(debug3) {:?} -> {:?} -> {:?}",
            val1, val2, val3
        );
    }
}


#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)]
use std::cmp::*;
use std::collections::*;
use std::mem::*;

fn main() {
    let (r, w, e) = (std::io::stdin(), std::io::stdout(), std::io::stderr());
    let mut io = IO::new(r.lock(), w.lock(), e.lock());
    assert_eq!(!0usize, std::usize::MAX); //🙊
    assert!(0 == 0); //😇

    let ab = io.readn::<char>(2);

    let ans = (ab[0] == 'H') ^ (ab[1] != 'H');
    io.writeln(if ans { "H" } else { "D" });
}

static MX: usize = 1010101;
static MOD: i64 = 1000000007;
static INF: i64 = std::i64::MAX >> 1;
// IO
use std::io::*;
struct IO<R: Read, W: Write, E: Write> {
    Read: R,
    Write: BufWriter<W>,
    Error: BufWriter<E>,
}
impl<R: Read, W: Write, E: Write> IO<R, W, E> {
    fn new(r: R, w: W, e: E) -> IO<R, W, E> {
        IO {
            Read: r,
            Write: BufWriter::new(w),
            Error: BufWriter::new(e),
        }
    }
    fn read<T>(&mut self) -> T
    where
        T: std::str::FromStr,
    {
        let next: String = self
            .Read
            .by_ref()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect();
        next.parse().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
    fn chari(&mut self) -> Vec<i64> {
        self.chars()
            .iter()
            .map(|&c| (c as u8 - b'0') as i64)
            .collect::<Vec<i64>>()
    }
    fn readn<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read::<T>()).collect::<Vec<_>>()
    }
    fn readmat<T: std::str::FromStr>(&mut self, n: usize, m: usize) -> Vec<Vec<T>> {
        (0..n).map(|_| self.readn(m)).collect()
    }
    fn write<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
    }
    fn writeln<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
        self.Write.write(b"\n");
    }
    fn debug<S: std::fmt::Debug>(&mut self, val: S) {
        writeln!(self.Error, "(debug) {:?}", &val);
    }
    fn debug2<S: std::fmt::Debug, T: std::fmt::Debug>(&mut self, val1: S, val2: T) {
        writeln!(self.Error, "(debug2) {:?} -> {:?}", val1, val2);
    }
    fn debug3<S: std::fmt::Debug, T: std::fmt::Debug, U: std::fmt::Debug>(
        &mut self,
        val1: S,
        val2: T,
        val3: U,
    ) {
        writeln!(
            self.Error,
            "(debug3) {:?} -> {:?} -> {:?}",
            val1, val2, val3
        );
    }
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
        a:char,
        b:char
    }
    if a == b{
        println!("H");
    }else{
        println!("D");
    }
}


let i=readLine()!.characters.split(" ").map{String($0)};print(i[0]==i[1] ?"H":"D")


let i=readLine()!.characters.split(" ");print(i[0]==i[1] ?"H":"D")


const main = (input) => {
  input = input.trim();
  input = input.split(' ');
  const a = input[0];
  const b = input[1];

  if (a=="H" && b=="H") {
    console.log("H");
  }else if (a=="D" && b=="D"){
    console.log("H");
  }else{
    console.log("D");
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  out(sin()==sin()?'H':'D')
}
main()


const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  out(ssin()==ssin()?'H':'D')
}
main()


const main = (input) => {
  input = input.split(' ');
  const a = input[0];
  const b = input[1];

  if (a=="H" && b=="H") {
    console.log("H");
  }else if (a=="D" && b=="D"){
    console.log("H");
  }else{
    console.log("D");
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


const main = (input) => {
  input = input.split(' ');
  const a = input[0];
  const b = input[1];

  if (a=='H' && b=='H') {
    console.log('H');
  }else if (a=='D' && b=='D'){
    console.log('H');
  }else{
    console.log('D');
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


def main():
    s = input()
    t = input()
    ans = 0
    substr = ''
    len_s = len(s)
    len_t = len(t)
    if t in s:
        print(0)
    else:
        for i in range(len_s - len_t + 1):
            substr = s[i: i + len_t]
            tmp = 0
            for sn, tn in zip(substr, t):
                if sn == tn:
                    tmp += 1
            ans = max(ans, tmp)
            if ans == len_t - 1:
                break
        print(len(t) - ans)

if __name__ == '__main__':
    main()


def main(S, T):
    score = float('inf')
    org_length = len(S)
    part_length = len(T)

    for i in range(0, org_length - part_length + 1):
        part_str = S[i:i + part_length]

        count = 0
        for a, b in zip(part_str, T):
            if a != b:
                count+=1
        score = min(count, score)

    print(score)

if __name__ == '__main__':
    S = input()
    T = input()
    main(S, T)


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 19 + 7
EPS = 10 ** -10

S = list(input())
T = list(input())
N = len(S)
M = len(T)

def check(S, T):
    res = 0
    for i in range(M):
        if S[i] != T[i]:
            res += 1
    return res

ans = INF
for i in range(N-M+1):
    ans = min(ans, check(S[i:i+M], T))
print(ans)


#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools as fts
import itertools as its
import math
import sys

INF = float('inf')

def solve(S: str, T: str):
    return len(T) - max(sum(s == t for s, t in zip(S[i:], T)) for i in range(len(S) - len(T)))

def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    T = next(tokens)  # type: str
    print(f'{solve(S, T)}')

if __name__ == '__main__':
    main()


S=[i for i in input()]
T=[j for j in input()]
ans=[]
for i in range(len(S)-len(T)):
  count=0
  new_S=[t for t in S[i:]]
  for j,k in zip(new_S,T):
    if j==k:
      count+=1
  else:
    ans.append(count)

print(len(T)-max(ans))


s = input()
t = input()

max_count = 0
for i in range(len(s) - len(t)):
  count = 0
  for j in range(len(t)):
    if t[j] == s[i + j]:
      count += 1
  if max_count < count:
    max_count = count
print(len(t) - max_count)


import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] s = br.readLine().toCharArray();
        char[] t = br.readLine().toCharArray();
        int minCount = t.length, count = 0;
        for(int i=0; i<=s.length-t.length; i++) {
            int temp = 0;
            count = 0;
            while(temp < t.length) {
                if(s[temp+i] != t[temp])
                    count++;
                temp++;
            }
            minCount = Math.min(minCount, count);
        }
        System.out.println(minCount);
        br.close();
    }
}


import java.io.BufferedReader;
import java.util.*;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		String s,t;
		s = fs.next();
		t = fs.next();
		int n = s.length();
		int m = t.length();
		int ans = Integer.MAX_VALUE;
		for(int i=0;i+m-1<n;i++) {
			int chn =0;
			for(int j=0;j<m;j++) {
				chn += (s.charAt(i+j)!=t.charAt(j))?1:0;
			}
			ans = Math.min(ans,chn);
		}
		System.out.println(ans);

	}
	static final Random random=new Random();
	static void ruffleSort(int[] a) {
		int n=a.length;//shuffle, then sort
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}

	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

}


//package atcoder.beginner177;

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
//        try {
//            FastScanner in = new FastScanner(new FileInputStream("src/input.in"));
//            PrintWriter out = new PrintWriter(new FileOutputStream("src/output.out"));

        FastScanner in = new FastScanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

            solve(1, in, out);

//        } catch (IOException e) {
//            e.printStackTrace();
//        }
    }

    private static void solve(int q, FastScanner in, PrintWriter out) {
        for (int qq = 0; qq < q; qq++) {
            String s = in.next(), t = in.next();
            int best = t.length();

            int diff = 0, m = t.length(), n = s.length();
            for(int i = 0; i <= n - m; i++) {
                diff = 0;
                for(int j = 0; j < m; j++) {
                    if(t.charAt(j) != s.charAt(j + i)) {
                        diff++;
                    }
                }
                best = Math.min(best, diff);
            }
            out.println(best);
        }
        out.close();
    }

    private static class BinarySearch {
        // return the right most index i such that a[i] <= t
        private static int rightMostUpperBound(Integer[] a, int t) {
            int l = 0, r = a.length - 1;
            while (l < r - 1) {
                int mid = l + (r - l) / 2;
                if (a[mid] <= t) {
                    l = mid;
                } else {
                    r = mid - 1;
                }
            }
            if (a[r] <= t) {
                return r;
            } else if (a[l] <= t) {
                return l;
            }
            return -1;
        }

        // return the left most index i such that a[i] >= t
        private static int leftMostLowerBound(Integer[] a, int t) {
            int l = 0, r = a.length - 1;
            while (l < r - 1) {
                int mid = l + (r - l) / 2;
                if (a[mid] >= t) {
                    r = mid;
                } else {
                    l = mid + 1;
                }
            }
            if (a[l] >= t) {
                return l;
            } else if (a[r] >= t) {
                return r;
            }
            return -1;
        }

        // Find the start and end index of a given t in a sorted(ascending) array; return [-1, -1] is t is not found
        private static int[] searchRange(Integer[] a, int t) {
            int first = firstPos(a, t);
            int last = firstPos(a, t + 1) - 1;
            if (first <= last) {
                return new int[]{first, last};
            }
            return new int[]{-1, -1};
        }

        private static int firstPos(Integer[] a, int t) {
            int first = a.length;
            int l = 0, r = a.length - 1;
            while (l <= r) {
                int mid = l + (r - l) / 2;
                if (a[mid] >= t) {
                    first = mid;
                    r = mid - 1;
                } else {
                    l = mid + 1;
                }
            }
            return first;
        }
    }

    private static class NumberTheory {
        private static long modularAdd(long a, long b, int mod) {
            long sum = a + b;
            if (sum >= mod) {
                sum -= mod;
            }
            return sum;
        }

        private static long modularSubtract(long a, long b, int mod) {
            long diff = a - b;
            if (diff < 0) {
                diff += mod;
            }
            return diff;
        }

        private static long fastModPow(long x, int n, long mod) {
            if (n == 0) {
                return 1;
            }
            long coeff = 1, base = x;
            while (n > 1) {
                if (n % 2 != 0) {
                    coeff = (coeff * base % mod);
                }
                base = (base * base % mod);
                n = n / 2;
            }
            long res = coeff * base % mod;
            return res;
        }

        private static long gcd(long a, long b) {
            if (b == 0) {
                return a;
            }
            return gcd(b, a % b);
        }

        private static long[] factorial(int n, long mod) {
            long[] factor = new long[n + 1];
            factor[0] = 1;
            for (int i = 1; i <= n; i++) {
                factor[i] = factor[i - 1] * i % mod;
            }
            return factor;
        }

        private static long modInv_EEA(long a, long mod) {
            long[] res = solveGcdEquation(a, mod);
            if (res[2] != 1) {
                // a and m are not coprime, modular inverse of a by m does not exist.
                return -1;
            }
            return (res[0] % mod + mod) % mod;
        }

        private static long[] solveGcdEquation(long a, long b) {
            if (b == 0) {
                return new long[]{1, 0, a};
            }
            long[] res = solveGcdEquation(b, a % b);
            return new long[]{res[1], res[0] - (a / b) * res[1], res[2]};
        }

        private static long binomialCoefficient(long[] factorial, long n, long k, long mod) {
            return factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod
                    * modInv_EEA(factorial[(int) (n - k)], mod) % mod;
        }
    }

    private static class Graph {
        private static int UNVISITED = 0;
        private static int VISITING = -1;
        private static int VISITED = 1;

        private static Stack<Integer> topologicalSort(Set<Integer>[] g) {
            Stack<Integer> stack = new Stack<>();
            int[] state = new int[g.length];

            for (int node = 0; node < g.length; node++) {
                if (!topoSortHelper(g, stack, state, node)) {
                    return null;
                }
            }
            return stack;
        }

        private static boolean topoSortHelper(Set<Integer>[] g, Stack<Integer> stack, int[] state, int currNode) {
            if (state[currNode] == VISITED) {
                return true;
            } else if (state[currNode] == VISITING) {
                return false;
            }
            state[currNode] = VISITING;
            for (int neighbor : g[currNode]) {
                if (!topoSortHelper(g, stack, state, neighbor)) {
                    return false;
                }
            }
            state[currNode] = VISITED;
            stack.push(currNode);
            return true;
        }
    }

    private static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream stream) {
            try {
                br = new BufferedReader(new InputStreamReader(stream));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        Integer[] nextIntArray(int n) {
            Integer[] a = new Integer[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        Long[] nextLongArray(int n) {
            Long[] a = new Long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextLong();
            }
            return a;
        }
    }
}


import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String t = sc.next();
        int ans = t.length();
        for(int i=0;i<=a-t.length();i++){int count = t.length();
                                         for(int j=0;j<t.length();j++){if(s.charAt(i+j)==t.charAt(j)){count--;}
                                                                      }
                            ans=Math.min(ans,count);
                                        }

		System.out.println(ans);
	}
}


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String t = scan.next();

		int ans = t.length();

		for (int i = 0; i <s.length()-t.length(); i++) {
			int diff=0;
			for (int j = 0; j < t.length(); j++) {
				if(s.charAt(i+j) != t.charAt(j) ) {
					diff++;
				}
			}
			ans = Math.min(ans,diff);
		}

		System.out.println(ans);

	}

}


import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);

        String question = scanner.next();
        String answer = scanner.next();

        int count = 0;
        int min = answer.length();
        for(int i=0;i<question.length()-answer.length();i++){
            for(int j=0;j<answer.length();j++){
            if(question.charAt(i+j) != answer.charAt(j)){
                count++;
            }
            }

            if(min > count)min = count;
            count=0;
        }

        System.out.print(min);
    }
}


#include<cstdio>
#include<algorithm>
#include<functional>
#include<cstring>
#include<queue>
using namespace std;

int main(void)
{
	int ls,lt,i,j,cnt,mn;
	char s[1001],t[1001];
	scanf("%s",s);
	scanf("%s",t);
	ls=strlen(s);
	lt=strlen(t);
	mn=10000;
	for(i=0;i<ls-lt+1;i++)	{
		cnt=0;
		for(j=0;j<lt;j++)	{
			if(s[i+j]!=t[j])	cnt++;
		}
		mn=min(cnt,mn);
	}
	printf("%d\n",mn);
	return 0;
}


#include<iostream>
#include<string>
#include<cstring>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
#define PI 3.141592653589793

long long modinv(long long a, long long m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

int main(){
  string s, t; cin >> s >> t;
  int n = s.size(); int m = t.size();
  int ans = inf;
  rep(i, n-m+1){
    int cnt = 0;
    rep(j, m){
      if(s[i+j]==t[j]) continue;
      else cnt++;
    }
    ans = min(ans, cnt);
  }
  cout << ans << endl;
}


#include<bits/stdc++.h>
using namespace std;

#include<ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
const int mod = (int)1e9+7;
#define REP0(i,n) for(int i=0;i<n;i++)
#define REP(i,a,n) for(int i=a;i<=n;i++)
#define F first
#define S second
#define endl "\n"
#define ll long long
#define pii pair<int,int>
#define vi vector<int>
#define maxpq priority_queue<int>
#define minpq priority_queue<int, vector<int>, greater<int> >
#define setbits(x) __builtin_popcountll(x)
#define inf (int)(1e18)
#define prec(x) fixed<<setprecision(x)<<x
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define all(x) x.begin(),x.end()

const int d4i[4]={-1, 0, 1, 0}, d4j[4]={0, 1, 0, -1};
const int d8i[8]={-1, -1, 0, 1, 1, 1, 0, -1}, d8j[8]={0, 1, 1, 1, 0, -1, -1, -1};

void solve(){
   string s,t;
   cin>>s>>t;
   int m = s.size();
   int n = t.size();
   int ml = INT_MAX;
   for(int i=0;i<m-n+1;i++){
       int len = 0;
       for(int j=0;j<n;j++){
           if(s[i+j] != t[j]){
               ++len;
           }
       }
       ml = min(ml,len);
   }
   cout<<ml<<endl;
}

int main(){
    fastio;
    #ifndef ONLINE_JUDGE
        //freopen("input.txt", "r", stdin);
        //freopen("output.txt", "w", stdout);
    #endif
    int tc = 1;
    // cin>>tc;
    for(int i=1;i<=tc;i++){
        solve();
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
  string s,t;
  cin >> s >> t;
  int ans = t.length();
  for(int i = 0; i < s.length() - t.length(); i++){
    int diff = 0;
   	for(int j = 0; j < t.length(); j++){
      if(s[i+j] != t[j])
        diff++;
    }
    ans = min(ans, diff);
  }
  cout << ans;
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  string a = "abcdefghijklmnopqrstuvwxyz";
  int i,j,ans =0 ,ii,ij,c=0;
  for(i=0;i<= s.length()-t.length();i++)
  {
      for(j=0;j<t.length();j++)
      {
          ii=i;
          //ij=j;
          if(s[ii++] == t[j])
            c++;
      }
      ans = max(ans,c);
      c=0;
  }

  cout<<t.length()-ans;
  return 0;
}
//codeforces
//atcoder


#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  string a = "abcdefghijklmnopqrstuvwxyz";
  int i,j,ans =0 ,ii,ij,c=0;
  for(i=0;i< s.length()-t.length();i++)
  {
      for(j=0;j<t.length();j++)
      {
          ii=i;
          //ij=j;
          if(s[ii++] == t[j])
            c++;
      }
      ans = max(ans,c);
      c=0;
  }

  cout<<t.length()-ans;
  return 0;
}
//codeforces
//atcoder


#include <stdio.h>
#include <string.h>

int main(void)
{

    int start, ans, diff;
    int i;
    int s, t;
    char S[1000], T[1000];

    scanf("%s", S);
    scanf("%s", T);

    s = strlen(S);
    t = strlen(T);

    ans = s;

    for (start = 0; start <= s - t; start++)
    {
        diff = 0;
        for (i = 0; i < t; i++)
        {
            if (T[i] != S[start + i])
            {
                diff++;
            }

        }
        if (ans > diff)
        {
            ans = diff;
        }

    }

    printf("%d",ans);

    return 0;
}


#include <stdio.h>
#include <string.h>

int main (void)
{
    char s[1005];
    char t[1005];
    int lens;
    int lent;
    int cnt=0;
    int ans;
    int i;
    int j;

    scanf("%s",s);
    lens = strlen(s);
    scanf("%s",t);
    lent = strlen(t);
    ans = lent;

    // printf("%d, %d", lens, lent);

    for(i=0;i<(lens-lent+1);i++){
        for(j=0;j<lent;j++){
            if(s[i+j]!=t[j]){
                cnt++;
            }
        }
        if(cnt < ans){
            ans = cnt;
        }
        cnt = 0;
    }

    printf("%d",ans);
    return 0;
}


#include<stdio.h>
#include<string.h>

int main(){
        char s[1001], t[1001], kiri[1001];
        int n, m;
        scanf("%s%s", s, t);
        n=strlen(s); m=strlen(t);

        int i, j, min, diff;
        min=m;
        for(i=0; i<=n-m; i++){
                diff=0;
                for(j=0; j<m; j++){
                        if(t[j]!=s[i+j]){
                                diff++;
                        }
                }
                if(min>diff){
                        min=diff;
                }
        }
        printf("%d", min);

        return 0;
}


#include <bits/stdc++.h>
using namespace std;;

int main(){

    string s, t;
    int sSize, tSize, ans, count;

    cin >> s >> t;

    sSize = s.size();
    tSize = t.size();

    ans = tSize;

    for (int i = 0; i <= sSize-tSize; i++){
        count = 0;
        for (int j = 0; j < tSize; j++){
            if (s[i + j] != t[j]){
                count++;
            }
        }
        ans = min(ans, count);
    }
    cout << ans << endl;
}


#include<stdio.h>
#include<string.h>

int main() {
  char S[1001], T[1001];

  scanf("%s", S);
  scanf("%s", T);

  int min = strlen(T);
  for(int i=0; i<strlen(S) - strlen(T); i++) {
    int counter = 0;
    for(int j=0; j<strlen(T); j++) {
      if(S[i+j] != T[j]) counter++;
    }
    if(min > counter)
      min = counter;
  }

  printf("%d", min);
  return 0;
}


#include<stdio.h>
#include<string.h>

int main() {
  char S[1001], T[1001];

  scanf("%s", S);
  scanf("%s", T);

  int min = 1000;
  int s_len = strlen(S);
  int t_len = strlen(T);

  int i_max = s_len-t_len;
  for(int i=0; i<i_max; i++) {
    int counter = 0;
    for(int j=0; j<t_len; j++) {
      if(S[i+j] != T[j]) counter++;
    }
    if(min > counter)
      min = counter;
  }

  printf("%d", min);
  return 0;
}


function Main(input) {
  input = input.replace(/\n/g, ' ').split(" ");
  var a = input[0];
  var b = input[1];
  var ans = 10000000;
  for(var i=0;i<a.length-(b.length-1);i++){
    var p = 0;
    for(var l=0;l<b.length;l++){
      var t =a.charAt(i+l);
      var s =b.charAt(l);
      if(t!=s)p++;
    }
    if(ans>p)ans=p;
  }
  console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input){
    let s = (input.split("\n")[0]).split("");
    let t = (input.split("\n")[1]).split("");
    let ans = t.length ;
    for(let a = 0; a <= s.length - t.length; a++){
        let diff = 0;
        for(let b = 0; b < t.length; b++){
            if(t[b] != s[a+b]){
                diff++;
            }
        }
        ans = Math.min(diff, ans);
    }
    console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


console.log((args=>{
  const [S,T] = args.trim().split`\n`;
  const sl = S.length, tl = T.length;
  let min = tl;
  for ( let i = 0; i <= sl-tl; i++ ) {
    let count = 0;
    for ( let j = 0; j < tl; j++ ) {
      if ( S[i+j] !== T[j] ) count++;
    }
    if ( min > count ) min = count;
  }
  return min;
})(require('fs').readFileSync('/dev/stdin','utf8')));


"use strict"
const create = () => {
    const input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
    const res = {
        "list": input, "index": 0, "max": input.length,
        "hasNext": function() {return this.index < this.max},
        "next": function() { if (!this.hasNext()) {throw "ArrayIndexOutOfBoundsException";}else{return this.list[this.index++];}}
    };
    return res;
}
const o = create();
const next = () => o.next()
const nextInt = () => parseInt(o.next())
const nextStrArray = () => o.next().split(" ")
const nextIntArray = () => o.next().split(" ").map(el => parseInt(el))
const nextCharArray = () => o.next().split("")
const hasNext = () => o.hasNext()
const myout = (...x) => console.log(...x)
const Main = () => {
    let s = next()
    let t = next()
    let ans = t.length
    for(let i = 0; i<s.length; i++){
        let tmp = t.length
        for(let j = 0; j<t.length; j++){
            if(s[i+j] == t[j]){
                tmp--
            }
        }
        ans = Math.min(ans, tmp)
    }
    console.log(ans)
    return
}
Main()


"use strict"
const create = () => {
    const input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
    const res = {
        "list": input, "index": 0, "max": input.length,
        "hasNext": function() {return this.index < this.max},
        "next": function() { if (!this.hasNext()) {throw "ArrayIndexOutOfBoundsException";}else{return this.list[this.index++];}}
    };
    return res;
}
const o = create();
const next = () => o.next()
const nextInt = () => parseInt(o.next())
const nextStrArray = () => o.next().split(" ")
const nextIntArray = () => o.next().split(" ").map(el => parseInt(el))
const nextCharArray = () => o.next().split("")
const hasNext = () => o.hasNext()
const myout = (...x) => console.log(...x)
const Main = () => {
    let s = next()
    let t = next()
    let ans = t.length
    for(let i = 0; i<s.length; i++){
        let tmp = t.length
        for(let j = 0; j<t.length; j++){
            if(s[i+j] !== t[j]){
                tmp--
            }
        }
        ans = Math.min(ans, tmp)
    }
    console.log(ans)
    return
}
Main()


"use strict"
const create = () => {
    const input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
    const res = {
        "list": input, "index": 0, "max": input.length,
        "hasNext": function() {return this.index < this.max},
        "next": function() { if (!this.hasNext()) {throw "ArrayIndexOutOfBoundsException";}else{return this.list[this.index++];}}
    };
    return res;
}
const o = create();
const next = () => o.next()
const nextInt = () => parseInt(o.next())
const nextStrArray = () => o.next().split(" ")
const nextIntArray = () => o.next().split(" ").map(el => parseInt(el))
const nextCharArray = () => o.next().split("")
const hasNext = () => o.hasNext()
const myout = (...x) => console.log(...x)
const Main = () => {
    let s = next()
    let t = next()
    let ans = t.length
    for(let i = 0; i<s.length; i++){
        let tmp = 0
        for(let j = 0; j<t.length; j++){
            if(s[i+j] !== t[j]){
                tmp++
            }
        }
        ans = Math.min(ans, tmp)
    }
    console.log(ans)
    return
}
Main()


package main

import (
	"bufio"
	"fmt"
	"os"
)

const (
	initialBufSize = 100000
	maxBufSize     = 10000000
)

var (
	sc = bufio.NewScanner(os.Stdin)
	wt = bufio.NewWriter(os.Stdout)
)

func next() string {
	sc.Scan()
	return sc.Text()
}

func puts(a ...interface{}) {
	fmt.Fprintln(wt, a...)
}

func min(nums ...int) int {
	ret := nums[0]
	for _, v := range nums {
		if v < ret {
			ret = v
		}
	}
	return ret
}

func main() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, initialBufSize), maxBufSize)
	defer wt.Flush()

	s, t := next(), next()

	ans := len(t)
	for i := 0; i <= len(s)-len(t); i++ {
		need := 0
		for j := 0; j < len(t); j++ {
			if s[i+j] != t[j] {
				need++
			}
		}
		ans = min(ans, need)
	}

	puts(ans)
}


package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

var sc *bufio.Scanner

const bufferSize = 1024

func nextString() string {
	if !sc.Scan() {
		panic(nil)
	}
	return sc.Text()
}

var production bool

func debugf(format string, v ...interface{}) {
	if !production {
		fmt.Printf(format, v...)
	}
}

func answer(reader io.Reader, writer io.Writer) {
	sc = bufio.NewScanner(reader)
	buf := make([]byte, bufferSize)
	sc.Buffer(buf, 1e+7)
	sc.Split(bufio.ScanWords)
	s := nextString()
	t := nextString()

	ans := len(t)
	for i := 0; i < len(s)-len(t)+1; i++ {
		a := len(t)
		for j := 0; j < len(t); j++ {
			if s[i+j] == t[j] {
				a--
			}
		}
		if a < ans {
			ans = a
		}
	}

	_, _ = fmt.Fprintf(writer, "%d", ans)
}

func main() {
	production = true
	answer(os.Stdin, os.Stdout)
}


package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"strings"
)

func main() {
	io := NewIo(os.Stdin, os.Stdout)
	defer io.Flush()
	s, t := io.Next(), io.Next()
	min := math.MaxInt64
	for i := 0; i+len(t) <= len(s); i++ {
		cnt := countDiff(s[i:i+len(t)], t)
		if cnt < min {
			min = cnt
		}
	}
	io.Println(min)
}

func countDiff(s, t string) int {
	cnt := 0
	for i := range s {
		if s[i] != t[i] {
			cnt++
		}
	}
	return cnt
}

// Io is I/O object
type Io struct {
	reader    *bufio.Reader
	writer    *bufio.Writer
	tokens    []string
	nextToken int
}

// NewIo returns a new Io instance
func NewIo(r io.Reader, w io.Writer) *Io {
	return &Io{
		reader: bufio.NewReader(r),
		writer: bufio.NewWriter(w),
	}
}

// Flush flushes writer
func (io *Io) Flush() {
	err := io.writer.Flush()
	if err != nil {
		panic(err)
	}
}

// NextLine scans a line from stdin
func (io *Io) NextLine() string {
	var buffer []byte
	for {
		line, isPrefix, err := io.reader.ReadLine()
		if err != nil {
			panic(err)
		}
		buffer = append(buffer, line...)
		if !isPrefix {
			break
		}
	}
	return string(buffer)
}

// Next return a word from stdin
func (io *Io) Next() string {
	for io.nextToken >= len(io.tokens) {
		line := io.NextLine()
		io.tokens = strings.Fields(line)
		io.nextToken = 0
	}
	r := io.tokens[io.nextToken]
	io.nextToken++
	return r
}

// Println is a wrapper of fmt.Fprintln
func (io *Io) Println(a ...interface{}) {
	fmt.Fprintln(io.writer, a...)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

const (
	initialBufSize = 100000
	maxBufSize     = 10000000
)

var (
	sc = bufio.NewScanner(os.Stdin)
	wt = bufio.NewWriter(os.Stdout)
)

func next() string {
	sc.Scan()
	return sc.Text()
}

func puts(a ...interface{}) {
	fmt.Fprintln(wt, a...)
}

func min(nums ...int) int {
	ret := nums[0]
	for _, v := range nums {
		if v < ret {
			ret = v
		}
	}
	return ret
}

func main() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, initialBufSize), maxBufSize)
	defer wt.Flush()

	s, t := next(), next()

	ans := len(t)
	for i := 0; i < len(s)-len(t); i++ {
		need := 0
		for j := 0; j < len(t); j++ {
			if s[i+j] != t[j] {
				need++
			}
		}
		ans = min(ans, need)
	}

	puts(ans)
}


package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
)

var sc *bufio.Scanner

const bufferSize = 1024

func nextString() string {
	if !sc.Scan() {
		panic(nil)
	}
	return sc.Text()
}

var production bool

func debugf(format string, v ...interface{}) {
	if !production {
		fmt.Printf(format, v...)
	}
}

func answer(reader io.Reader, writer io.Writer) {
	sc = bufio.NewScanner(reader)
	buf := make([]byte, bufferSize)
	sc.Buffer(buf, 1e+7)
	sc.Split(bufio.ScanWords)
	s := nextString()
	t := nextString()

	ans := len(t)
	for i := 0; i < len(s)-len(t); i++ {
		a := len(t)
		for j := 0; j < len(t); j++ {
			if s[i+j] == t[j] {
				a--
			}
		}
		if a < ans {
			ans = a
		}
	}

	_, _ = fmt.Fprintf(writer, "%d", ans)
}

func main() {
	production = true
	answer(os.Stdin, os.Stdout)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var sc = bufio.NewScanner(os.Stdin)

func next() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	s := next()
	t := next()

	sl := len(s)
	tl := len(t)
	ans := sl
	for i := 0; i < sl-tl; i++ {
		tmp := count(s[i:i+tl], t)
		if tmp < ans {
			ans = tmp
		}
	}

	fmt.Println(ans)
}

func count(s, t string) int {
	ch := len(s)
	for i := 0; i < len(s); i++ {
		if s[i:i+1] == t[i:i+1] {
			ch--
		}
	}
	return ch
}


S = gets.chomp
T = gets.chomp

s_n = S.chars
t_n = T.chars
s_l = s_n.length
t_l = t_n.length
ans = t_l
(0..(s_l-t_l)).each do |i|
  count = 0
  (0..t_l-1).each do |j|
    count += 1 if s_n[i+j] != t_n[j]
  end
  ans = [ans, count].min
end

p ans


s = gets.chomp.split("")
t = gets.chomp.split("")

result = t.length
s.each_cons(t.length) do |arr|
  tmp = t.length
  (0..t.length-1).each do |i|
    tmp -= 1 if arr[i] == t[i]
  end
  result = tmp if tmp < result
end

puts result


s=gets.chomp.split("").map(&:to_s)
v=gets.chomp.split("").map(&:to_s)

count=Array.new(v.length){0}
for i in 0..(s.length-v.length)
    vv=s[i..i+v.length-1]

    check=0
    for j in 0..vv.length-1
        if vv[j]==v[j]
            check+=1
        end

    end
    count[i]=check

end
p v.length-count.max


s = gets.split("")
t = gets.split("")
n = 0
m = 0
cnt = 0
res = []

while n <= (s.length - t.length) do
  t.length.times do
    if s[n+m] == t[m]
      cnt += 1
    end
    m += 1
  end
  n += 1
  m = 0
  res << cnt
  cnt = 0
end

puts t.length - res.max


s = gets.split("")
t = gets.split("")
n = 0
m = 0
cnt = 0
res = []

while n <= (s.length - t.length) do
  t.length.times do
    if s[n+m] == t[m]
      cnt += 1
    end
    m += 1
  end
  n += 1
  m = 0
  res << cnt
  cnt = 0
end

puts t - res.max


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
  }

  macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
  }

  macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
  }

use std::cmp::max;
fn main() {
    input!{
        s: chars,
        t: chars,
    }
    let mut ans = 0;
    let d = s.len() - t.len();
    for i in 0..d+1 {
        let mut count = 0;
        for j in 0..t.len() {
            if s[i+j] == t[j] {
                count += 1;
            }
        }
        ans = max(count,ans);
    }
    println!("{}",t.len() - ans);
}


use proconio::{fastout, input, marker::Chars};

#[fastout]
fn main() {
    input! {
        s: Chars,
        t: Chars,
    }

    let n = s.len();
    let m = t.len();
    let mut ans = std::i64::MAX;

    for i in 0..n - m + 1 {
        let mut count = 0;
        for j in 0..m {
            if s[i + j] != t[j] {
                count += 1;
            }
        }
        if count < ans {
            ans = count;
        }
    }

    println!("{}", ans)
}


fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn main() {
    // solver code...
    let s_tmp = read::<String>();
    let t_tmp = read::<String>();

    let s: Vec<char> = s_tmp.chars().collect();
    let t: Vec<char> = t_tmp.chars().collect();
    let mut min_count = s.len() + 1;
    let range: usize = s.len() - t.len() + 1;
    for i in 0..range {
        let mut tmp_count = 0;
        for j in 0..t.len() {
            if s[i+j] != t[j] {
                tmp_count += 1;
            }
        }
        min_count = std::cmp::min(min_count, tmp_count);
    }
    println!("{}", min_count);
}


fn b() {
    input!{
        s: Chars,
        t: Chars,
    }

    let mut ans = std::usize::MAX;

    for i in 0..(s.len() - t.len()) {
        let mut count = 0;
        for j in 0..t.len() {
            if s[i + j] != t[j] {
                count += 1;
            }
        }
        if ans > count {
            ans = count;
        }
    }
    println!("{}", ans);
}

use proconio::{input, marker::Chars};

fn main() {
    b();
}


fn b() {
    input!{
        s: Chars,
        t: Chars,
    }

    let mut ans = usize::MAX;

    for i in 0..(s.len() - t.len()) {
        let mut count = 0;
        for j in 0..t.len() {
            if s[i + j] != t[j] {
                count += 1;
            }
        }
        if ans > count {
            ans = count;
        }
    }
    println!("{}", ans);
}

use proconio::{input, marker::Chars};

fn main() {
    b();
}


use proconio::*;

fn main() {
    input! {s: String, t: String}
    let (s, t) : (String, String) = (s, t);
    let (s_chars, t_chars): (Vec<char>,Vec<char>) = (s.chars().collect(), t.chars().collect());
    let mut max = 0;
    let mut count = 0;
    for i in 0.. s_chars.len() - t_chars.len() {
        for j in 0.. t_chars.len() {
            if s_chars[i+j] == t_chars[j]{
                count += 1;
            }
        }
        if count > max { max = count; }
        count = 0;
    }
    println!("{}", t_chars.len() - max);
}


func main2(text1: [Character] = Array(readLine()!), text2: [Character] = Array(readLine()!)) {
    let text2Count = text2.count
    var result = text2Count
    for index in text1.startIndex...(text1.endIndex - text2Count) {
        var difference = 0
        for (character1, character2) in zip(text1[index...], text2) where character1 != character2 {
            difference += 1
        }
        if result > difference {
            result = difference
        }
    }
    print(result)
}

main2()


import Foundation
let s = readLine()!
let t = readLine()!

if t.isEmpty {
  print(s.isEmpty ? 0 : -1)
  exit(0)
}

let S = Array(s)
let T = Array(t)

var ans = T.count

func diff(_ S: [Character], _ T: [Character], _ index: Int) -> Int {

  var diff = 0
  for i in 0..<T.count {
    if T[i] != S[index + i] {
      diff += 1
    }
  }

  return diff
}

for i in 0...S.count - T.count {
  ans = min(ans, diff(S, T, i))
  if ans == 0 {
    break
  }
}

print(ans)


func main(text1: String = readLine()!, text2: String = readLine()!) {
    let text2Indices = text2.indices
    let text2Count = text2.count
    var result = text2Count
    for text1Index in text1.indices {
        if text1[text1Index...].count < text2Count { break }
        var counter = 0
        for (i, j) in zip(text1[text1Index...].indices, text2Indices) where text1[i] != text2[j] {
            counter += 1
        }
        if result > counter {
            result = counter
        }
    }
    print(result)
}

main()


// 🐋💭
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readInt() -> Int {
    return Int(readLine()!)!
}

func readDoubles () -> [Double] {
    return readLine()!.split(separator: " ").map { Double($0)! }
}

func readDouble() -> Double{
    return Double(readLine()!)!
}

func readLines() -> [String] {
    return readLine()!.map { String($0) }
}
///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}

///最大公約数を返す
func gcd(_ array: [Int]) -> Int {
    var value = array[0]
    if array.count > 1 {
        for i in 1..<array.count {
            value = gcd(value, array[i])
        }
    }
    return value
}

///最小公倍数を返す
func lcm(_ m:Int, _ n:Int) -> Int {
    return m * n / gcd(m, n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}

//https://riptutorial.com/ja/swift/example/14738/インデックスを知らずに配列から要素を削除する
extension Array where Element: Equatable {

    mutating func remove(_ element: Element) {
        _ = firstIndex(of: element).flatMap {
            self.remove(at: $0)
        }
    }
}

func binarySearch(rifgt:Int, key:Int, ary:[String]) -> Int{
    var left = 0
    var right = rifgt

    while abs(right - left) > 1 {
        let mid = left + (right - left) / 2

        if Int(ary[mid])! < key {
            left = mid

        } else {
            right = mid
        }
    }
    return left
}

func arrangement (prev:String, ary:[String], returnVal:[String]) -> [String] {
    var returnVal = returnVal
    if ary.count == 0 {
        returnVal.append(prev)
        return returnVal
    }

    for s in ary {
        let wprev = prev + s
        var wary = ary
        wary.remove(s)
        returnVal = arrangement(prev: wprev, ary: wary, returnVal: returnVal)
    }
    return returnVal
}
// https://algo-logic.info/divisor/
/// 約数の配列を返す
func divisor(_ n:Int) -> [Int] {
    var ret = [Int]()
    var i = 1
    while i * i <= n {
        if n % i == 0 {
            ret.append(i)
            if i * i != n {
                ret.append(n / i)
            }
        }
        i += 1
    }
    return ret.sorted()
}

func main() {
    let S = readLines()
    let T = readLines()
    //＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿入力
    var ans = 1000

    print(S.count, T.count)

    let length = S.count == T.count ? 1: S.count - T.count
    for i in 0..<length {
        var cnt = 0
        for j in 0..<T.count {
            if S[i + j] != T[j] {
                cnt += 1
            }
        }
        ans = min(ans, cnt)
    }
    print(ans)
}
main()


func main(text1: String = readLine()!, text2: String = readLine()!) {
    let text2Count = text2.count
    var searchText1 = text1
    searchText1.removeLast(text2Count)
    var result = text2Count
    for text1Index in searchText1.indices {
        var difference = 0
        for (character1, character2) in zip(text1[text1Index...], text2) where character1 != character2 {
            difference += 1
        }
        if result > difference {
            result = difference
        }
    }
    print(result)
}

main()


import Foundation

let s = readLine() ?? ""
let t = readLine() ?? ""

let minCost = (0...max(0, s.count - t.count))
    .map(s.dropFirst)
    .map { zip($0, t).filter { $0 != $1 }.count }
    .min() ?? 0

print(minCost)


import * as fs from "fs";

const input = fs.readFileSync("/dev/stdin", "utf8").split("\n");

let s: string;
let t: string;

s = input[0];
t = input[1];

var ans = 100000;
for (let i = 0; i <= s.length - t.length; i++) {
    var count = 0;
    for (let j = i; j < i + t.length; j++) {
        if (s[j] != t[j - i]) count++;
    }
    if (count < ans) ans = count;
}
console.log(ans);


var main = (input: string) => {
    let a: string[] = input.split("\n");
    let template: string = a[0];
    let target: string = a[1];

    let minCount = target.length;
    for (let i: number = 0; i <= template.length - target.length; i++) {
        let hollowed = template.substring(i, i + target.length);
        let count = 0;
        for (let j: number = 0; j < target.length; j++) {
            if (hollowed.charAt(j) !== target.charAt(j)) {
                count++;
            }
        }
        if (count < minCount) {
            minCount = count;
        }
    }
    console.log(minCount);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


import * as fs from 'fs';

const input = fs.readFileSync("/dev/stdin", "utf8").split("\n");
const s = input[0] as string;
const t = input[1] as string;
var l = t.length;
for (var i = 0; i <= s.length - t.length; i++) {
    var l0 = 0;
    for (var j = 0; j < t.length; j++) {
        if (s[i + j] != t[j]) {
            l0++;
            if (l < l0) break;
        }
    }
    if (l0 < l) l = l0;
    if (l == 0) break;
}
console.log(l);


var main = (input: string) => {
    let a: string[] = input.split("\n");
    let template: string = a[0];
    let target: string = a[1];

    let minCount = target.length;
    for (let i: number = 0; i < template.length - target.length; i++) {
        let hollowed = template.substring(i, i + target.length);
        let count = 0;
        for (let j: number = 0; j < target.length; j++) {
            if (hollowed.charAt(j) !== target.charAt(j)) {
                count++;
            }
        }
        if (count < minCount) {
            minCount = count;
        }
    }
    console.log(minCount);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007

def main():
    N, Q = map(int, readline().split())
    S = readline().strip()
    (*LR,) = map(int, read().split())

    vec = [0] * (N + 1)
    for i in range(N - 1):
        vec[i + 1] = vec[i]
        if S[i] == 'A' and S[i + 1] == 'C':
            vec[i + 1] += 1

    ans = [0] * Q
    for i, (l, r) in enumerate(zip(*[iter(LR)] * 2)):
        l -= 1
        r -= 1
        ans[i] = vec[r] - vec[l]

    print('\n'.join(map(str, ans)))
    return

if __name__ == '__main__':
    main()


def main():
    from itertools import accumulate

    n, q, s, *lr = open(0).read().split()
    n = int(n)
    *u, = map(int, lr)
    c = [1 if s[i] == 'C' and s[i - 1] == 'A' else 0 for i in range(n)]
    a = tuple(accumulate(c))
    ans = ''
    for i,j in zip(*[iter(u)]*2):
        ans += str(a[j-1]-a[i-1]) + '\n'
    print(ans)

if __name__ == '__main__':
    main()


def main():
    from itertools import accumulate
    import sys
    n, q, s, *lr = sys.stdin.read().split()
    *query, = map(int, lr)
    c = [1 if s[i] == 'C' and s[i - 1] == 'A' else 0 for i in range(int(n))]
    a = tuple(accumulate(c))
    ans = ''
    for i,j in zip(*[iter(query)]*2):
        ans += str(a[j-1]-a[i-1]) + '\n'
    print(ans)

if __name__ == '__main__':
    main()


n,q=map(int,input().split())
s=input()
a=[0]
for l in range(n):
    if s[l]=='A' and s[l+1]=='C':
        a.append(a[l]+1)
    else :
        a.append(a[l])
for k in range(q):
    x,y=map(int,input().split())
    print(a[y-1]-a[x-1])


n,q=map(int,input().split())
s=input()
a=[0]
for l in range(n):
    if s[l]=='A' and s[l+1]=='C':
        for j in range(1,3):
            a.append(a[l]+1)
        l+=1
    else :
        a.append(a[l])
for k in range(q):
    x,y=map(int,input().split())
    print(a[y-1]-a[x-1])


n,q=map(int,input().split())
s=input()
a=[0]
for l in range(n):
    if s[l]=='A' and s[l+1]=='C':
        for j in range(1,2):
            a.append(a[l]+1)
        l+=1
    else :
        a.append(a[l])
for k in range(q):
    x,y=map(int,input().split())
    print(a[y-1]-a[x-1])
print(a)


import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;

public class Main {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve() {
		int n = ni();
		int q = ni();
		char[] a = ns().toCharArray();
		int dp[] = new int[a.length];
		for (int i = 1; i < a.length; i++)
			if (a[i] == 'C' && a[i - 1] == 'A')
				dp[i] = dp[i - 1] + 1;
			else
				dp[i] = dp[i - 1];
//		tr(dp);
		while (q-- > 0) {
			int l = ni() - 1;
			int r = ni() - 1;
			if (l < r)
				sb.append(dp[r] - dp[l]);
			else
				sb.append(0);
			sb.append(' ');

		}
		System.out.println(sb.toString());
	}

	StringBuffer sb = new StringBuffer();

	void run() throws Exception {
		is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);
		Thread t = new Thread(null, null, "~", Runtime.getRuntime().maxMemory()) {
			@Override
			public void run() {
				long s = System.currentTimeMillis();
				solve();
				out.flush();
				if (!INPUT.isEmpty())
					tr(System.currentTimeMillis() - s + "ms");
			}
		};
		t.start();
		t.join();
	}

	public static void main(String[] args) throws Exception {
		new Main().run();
	}

	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = is.read(inbuf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) {
		return !(c >= 33 && c <= 126);
	}

	private int skip() {
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	private double nd() {
		return Double.parseDouble(ns());
	}

	private char nc() {
		return (char) skip();
	}

	private String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n) {
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m) {
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	private int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	private int[][] na(int n, int m) {
		int[][] a = new int[n][];
		for (int i = 0; i < n; i++)
			a[i] = na(m);
		return a;
	}

	private int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private static void tr(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}
}