>>> it = iter(["".join(x) for x in permutations("LGBTQ")]); print("\n".join([" ".join(x) for x in zip_longest(*[it]*10, fillvalue=' ')]))
LGBTQ LGBQT LGTBQ LGTQB LGQBT LGQTB LBGTQ LBGQT LBTGQ LBTQG
LBQGT LBQTG LTGBQ LTGQB LTBGQ LTBQG LTQGB LTQBG LQGBT LQGTB
LQBGT LQBTG LQTGB LQTBG GLBTQ GLBQT GLTBQ GLTQB GLQBT GLQTB
GBLTQ GBLQT GBTLQ GBTQL GBQLT GBQTL GTLBQ GTLQB GTBLQ GTBQL
GTQLB GTQBL GQLBT GQLTB GQBLT GQBTL GQTLB GQTBL BLGTQ BLGQT
BLTGQ BLTQG BLQGT BLQTG BGLTQ BGLQT BGTLQ BGTQL BGQLT BGQTL
BTLGQ BTLQG BTGLQ BTGQL BTQLG BTQGL BQLGT BQLTG BQGLT BQGTL
BQTLG BQTGL TLGBQ TLGQB TLBGQ TLBQG TLQGB TLQBG TGLBQ TGLQB
TGBLQ TGBQL TGQLB TGQBL TBLGQ TBLQG TBGLQ TBGQL TBQLG TBQGL
TQLGB TQLBG TQGLB TQGBL TQBLG TQBGL QLGBT QLGTB QLBGT QLBTG
QLTGB QLTBG QGLBT QGLTB QGBLT QGBTL QGTLB QGTBL QBLGT QBLTG
QBGLT QBGTL QBTLG QBTGL QTLGB QTLBG QTGLB QTGBL QTBLG QTBGL