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

void update(int *list, const int N, const int i, const int x){
  int min, current = N+i;
  list[current] = x;
  if ( current % 2 == 0 )
    min = list[current] < list[current+1] ? list[current] : list[current+1];
  else
    min = list[current] < list[current-1] ? list[current] : list[current-1];
  while ( current != 1 ){
    current /= 2;
    if ( min < list[current] )
      list[current] = min;
  }
  return;
}

int leftBound(int index, const int N){
  while ( index < N )
    index *= 2;
  return index-N;
}

int rightBound(int index, const int N){
  while ( index < N )
    index = 2*index+1;
  return index-N;
}

int leftChild(int index){
  return 2*index;
}

int rightChild(int index){
  return 2*index+1;
}

int findMin(int *list, const int N, const int index, const int x, const int y){
  int left = leftBound(index,N);
  int right = rightBound(index,N);
  if ( x == left && y == right )
    return list[index];
  // check if range is in left subtree
  else if ( rightBound(leftChild(index),N) >= y )
    return findMin(list,N,2*index,x,y);
  // check if range is in right subtree
  else if ( leftBound(rightChild(index),N) <= x )
    return findMin(list,N,2*index+1,x,y);
  else {
    int leftMin = findMin(list,N,leftChild(index),x,rightBound(leftChild(index),N));
    int rightMin = findMin(list,N,rightChild(index),leftBound(rightChild(index),N),y);
    if ( leftMin < rightMin )
      return leftMin;
    else
      return rightMin;
  }
}

void print(int *list, int N){
  int i;
  for ( i = 0; i < 2*N; i++ )
    printf("%d%c", list[i], i==(2*N-1) ? '\n' : ' ');
  return;
}
  
int main(){
  int n, q, i = 1, N, com, x, y;
  scanf(" %d %d", &n, &q);
  while ( i <= n )
    i *= 2;
  N = i;
  int *list = (int *) malloc(sizeof(int[2*N]));
  for ( i = 0; i < 2*N; i++ )
    list[i] = (1 << 30) - 1 + (1 << 30);
  for ( i = 0; i < q; i++ ){
    scanf(" %d %d %d", &com, &x, &y);
    switch( com ){
    case 0:
      update(list, N, x, y);
      break;
    case 1:
      printf("%d\n", findMin(list, N, 1, x, y));
      break;
    }
  }
  print(list,N);
  return 0;
}

