import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

immutable long MOD = 10^^9 + 7;
long[] F;

void solve() {
    auto s = readln.split.map!(to!long);
    auto N = s[0];
    auto X = s[1];
    writeln(X * 2);
}

void main() {

    auto T = readln.chomp.to!int;
    while(T--) solve;
}