let rule_matrix = [
  ['L','L','L','L'],
  ['L','L','L','L'],
  ['L','L','L','L'],
  ['L','C','C','L'],
  ['C','S','S','C'],
  ['S','S','S','S'],
  ['S','S','S','S'],
];