#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cassert>
#include <cstddef>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <sstream>
#include <fstream>
#include <functional>
#include <chrono>

using namespace std;
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int (i) = (a); (i) < (b); (i)++)
#define RREP(i, a) for(int (i) = (a) - 1; (i) >= 0; (i)--)
#define FORR(i, a, b) for(int (i) = (a) - 1; (i) >= (b); (i)--)
#define DEBUG(C) cerr << #C << " = " << C << endl;
using LL = long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<LL>;
using VVL = vector<VL>;
using VD = vector<double>;
using VVD = vector<VD>;
using PII = pair<int, int>;
using PDD = pair<double, double>;
using PLL = pair<LL, LL>;
using VPII = vector<PII>;
template<typename T> using VT = vector<T>;
#define ALL(a) begin((a)), end((a))
#define RALL(a) rbegin((a)), rend((a))
#define SORT(a) sort(ALL((a)))
#define RSORT(a) sort(RALL((a)))
#define REVERSE(a) reverse(ALL((a)))
#define MP make_pair
#define FORE(a, b) for (auto &&a : (b))
#define FIND(s, e) ((s).find(e) != (s).end())
#define EB emplace_back
template<typename T> inline bool chmax(T &a, T b){if (a < b){a = b;return true;}return false;}
template<typename T> inline bool chmin(T &a, T b){if (a > b){a = b;return true;}return false;}

const int INF = 1e9;
const int MOD = INF + 7;
const LL LLINF = 1e18;
const double EPS = 1e-9;

template<typename T>
class SegmentTree {
private:
    std::vector<T> data, lazy;
    std::vector<bool> lazyFlag;
    int size;
    const std::function<T(T, T)> op, change;
    const T initVal;
    void push(int l, int r, int k) {
        if (this->lazyFlag[k]) {
            this->data[k] = change(this->data[k], this->lazy[k]);
            if (k * 2 + 2 < this->size * 2 - 1) {
                this->lazyFlag[k * 2 + 1]
                = this->lazyFlag[k * 2 + 2]
                = true;
                this->lazy[k * 2 + 1]
                = this->lazy[k * 2 + 2]
                = this->lazy[k];
            }
            this->lazyFlag[k] = false;
        }
    }
    void update(int l, int r, int L, int R, int k, T val) {
        this->push(l, r, k);
        if (L <= l && r <= R) {
            this->lazy[k] = val;
            this->lazyFlag[k] = true;
            this->push(l, r, k);
        } else if (R <= l || r <= L) {
            return;
        } else if (r - l > 1) {
            const int mid = (l + r) / 2;
            this->update(l, mid, L, R, k * 2 + 1, val);
            this->update(mid, r, L, R, k * 2 + 2, val);
            data[k] = op(data[k * 2 + 1], data[k * 2 + 2]);
        }
    }
    T query(int l, int r, int L, int R, int k) {
        this->push(l, r, k);
        if (L <= l && r <= R) {
            return data[k];
        } else if (R <= l || r <= L) {
            return this->initVal;
        } else {
            const int mid = (l + r) / 2;
            const T left = this->query(l, mid, L, R, k * 2 + 1);
            const T right = this->query(mid, r, L, R, k * 2 + 2);
            return op(left, right);
        }
    }
public:
    SegmentTree(const int size_, T initVal_, std::function<T(T, T)> op_, std::function<T(T, T)> change_)
        : op(op_), change(change_), initVal(initVal_) {
        this->size = 1;
        while (this->size < size_) this->size <<= 1;
        data.resize(this->size * 2 - 1, this->initVal);
        lazy.resize(this->size * 2 - 1, this->initVal);
        lazyFlag.resize(this->size * 2 - 1, false);
    }
    void update(int l, int r, T val) {
        this->update(0, this->size, l, r, 0, val);
    }
    T query(int l, int r) {
        return this->query(0, this->size, l, r, 0);
    }
    void output() {for_each(data.begin(), data.end(), [](int e){cout << e << " ";});cout<<endl;}
};

int main() {
    int n, q;
    cin >> n >> q;
    SegmentTree<int> seg(n, INT_MAX, [](int l, int r) {
        return min(l, r);
    }, [](int l, int r) {
        return r;
    });
    while (q--) {
        //seg.output();
        int c, x, y;
        cin >> c >> x >> y;
        if (c) {
            cout << seg.query(x, y + 1) << endl;
        } else {
            seg.update(x, x + 1, y);
        }
    }
}

Measured memory_bytes: 4896