fork download
  1. #include <iostream>
  2. #include <cmath>
  3. #include <vector>
  4. #include <string.h>
  5. #include <bits/stdc++.h>
  6. #include <cstdlib>
  7. #include <time.h>
  8. #include <fstream>
  9. #include <iterator>
  10. #include <utility>
  11. #include <algorithm>
  12. #include <set>
  13. #include <map>
  14. #include <bitset>
  15. using namespace std;
  16.  
  17. #define ll long long
  18. #define ld long double
  19. typedef vector<int> vi;
  20. typedef multiset<int> mi;
  21. typedef multiset<ll> mll;
  22. typedef vector<ll> vll;
  23. typedef vector<bool> vb;
  24. typedef vector<vector<int>> _2vi;
  25. typedef vector<vector<ll>> _2vll;
  26. #define all(v) ((v).begin()), ((v).end())
  27. #define sz(v) ((ll)((v).size()))
  28.  
  29. #define vinp(v, n) \
  30.   for (ll i = 0; i < (n); i++) \
  31.   cin >> (v)[i]
  32. #define printv(v) \
  33.   for (auto i : (v)) \
  34.   cout << i << " "
  35. #define Bustany \
  36.   ios::sync_with_stdio(0); \
  37.   cin.tie(0); \
  38.   cout.tie(0);
  39. #define fr0(i, n) for (int(i) = 0; (i) < (n); (i)++)
  40. #define fr1(i, n) for (int(i) = 1; (i) < (n); (i)++)
  41. #define _CRT_SECURE_NO_WARNING
  42. const ll MOD = 1000000007;
  43.  
  44. void solve()
  45. {
  46. string s;
  47. getline(cin, s);
  48. stringstream ss(s);
  49. string x;
  50. while (ss >> x)
  51. {
  52. char i = x.front();
  53. if(x[0]<97){
  54. x[0]+=32;
  55. }
  56. x.push_back(x.front());
  57. x.erase(x.begin());
  58. if (i < 97)
  59. {
  60. x[0] -= 32;
  61. }
  62. x += "sui";
  63. cout << x << " ";
  64. }
  65. cout << endl;
  66. }
  67.  
  68. int main()
  69. {
  70. Bustany;
  71. int t = 1;
  72. cin >> t;
  73. cin.ignore();
  74. while (t--)
  75. {
  76. solve();
  77. }
  78. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout