CONSORT flow

consort <- readRDS(here("data", "derived_data", "completion_summary.rds")) %>% 
  spread(reason, n) %>% 
  mutate(group = 1:n(),
         assigned = Approved + `Failed first attention check`,
         issue = str_replace_all(issue, "assistance", "assist.")) %>% 
  mutate(assigned_label = glue("Allocated to Group {group}\n{crackdown}\n{issue}\n{funding} funding\n\nN = {assigned}"),
         completed_label = glue("Completed\nN = {Approved}\n\n{`Failed first attention check`} failed\nattention check"))

assessed_eligibility_n <- sum(consort$Approved, consort$`Failed first attention check`, 
                              consort$`Took survey outisde of MTurk`)
ineligible_n <- sum(consort$`Took survey outisde of MTurk`)
randomized_n <- sum(consort$Approved, consort$`Failed first attention check`)


# https://aghaynes.wordpress.com/2018/05/09/flow-charts-in-r/
# set some parameters to use repeatedly
width <- 0.1
xs <- seq(0.1, 0.9, length.out = 8)
allocated_y <- 0.375
completed_y <- 0.125

box_gp_grey <- gpar(fill = ngo_cols("light grey"))
box_gp_blue_dk <- gpar(fill = ngo_cols("blue"), alpha = 0.75)
box_gp_blue_lt <- gpar(fill = ngo_cols("blue"), alpha = 0.35)
box_gp_green <- gpar(fill = ngo_cols("green"), alpha = 0.65)
box_gp_yellow <- gpar(fill = ngo_cols("yellow"))
box_gp_orange <- gpar(fill = ngo_cols("orange"), alpha = 0.65)

txt_gp <- gpar(fontfamily = "Roboto Condensed", 
               fontface = "plain", fontsize = 8)

# Create boxes
total <- boxGrob(glue("Assessed for eligibility\n N = {assessed_eligibility_n}"), 
                 x = 0.5, y = 0.9, width = 2 * width,
                 box_gp = box_gp_blue_lt, txt_gp = txt_gp)
randomized <- boxGrob(glue("Randomized\n N = {randomized_n}"), 
                      x = 0.5, y = 0.65, width = 2 * width,
                      box_gp = box_gp_blue_dk, txt_gp = txt_gp)
ineligible <- boxGrob(glue("Participants excluded for\ncompleting Qualtrics survey\noutside of MTurk\n N = {ineligible_n}"), 
                      x = xs[7], y = 0.775, #width = 0.25,
                      box_gp = box_gp_yellow, txt_gp = txt_gp)

group1 <- boxGrob(filter(consort, group == 1)$assigned_label,
                  x = xs[1], y = allocated_y, width = width, 
                  box_gp = box_gp_orange, txt_gp = txt_gp)
group2 <- boxGrob(filter(consort, group == 2)$assigned_label,
                  x = xs[2], y = allocated_y, width = width, 
                  box_gp = box_gp_orange, txt_gp = txt_gp)
group3 <- boxGrob(filter(consort, group == 3)$assigned_label,
                  x = xs[3], y = allocated_y, width = width, 
                  box_gp = box_gp_orange, txt_gp = txt_gp)
group4 <- boxGrob(filter(consort, group == 4)$assigned_label,
                  x = xs[4], y = allocated_y, width = width, 
                  box_gp = box_gp_orange, txt_gp = txt_gp)
group5 <- boxGrob(filter(consort, group == 5)$assigned_label,
                  x = xs[5], y = allocated_y, width = width, 
                  box_gp = box_gp_orange, txt_gp = txt_gp)
group6 <- boxGrob(filter(consort, group == 6)$assigned_label,
                  x = xs[6], y = allocated_y, width = width, 
                  box_gp = box_gp_orange, txt_gp = txt_gp)
group7 <- boxGrob(filter(consort, group == 7)$assigned_label,
                  x = xs[7], y = allocated_y, width = width, 
                  box_gp = box_gp_orange, txt_gp = txt_gp)
group8 <- boxGrob(filter(consort, group == 8)$assigned_label,
                  x = xs[8], y = allocated_y, width = width, 
                  box_gp = box_gp_orange, txt_gp = txt_gp)

group1_completed <- boxGrob(filter(consort, group == 1)$completed_label, 
                            x = xs[1], y = completed_y, width = width,
                            box_gp = box_gp_green, txt_gp = txt_gp)
group2_completed <- boxGrob(filter(consort, group == 2)$completed_label, 
                            x = xs[2], y = completed_y, width = width,
                            box_gp = box_gp_green, txt_gp = txt_gp)
group3_completed <- boxGrob(filter(consort, group == 3)$completed_label, 
                            x = xs[3], y = completed_y, width = width,
                            box_gp = box_gp_green, txt_gp = txt_gp)
group4_completed <- boxGrob(filter(consort, group == 4)$completed_label, 
                            x = xs[4], y = completed_y, width = width,
                            box_gp = box_gp_green, txt_gp = txt_gp)
group5_completed <- boxGrob(filter(consort, group == 5)$completed_label, 
                            x = xs[5], y = completed_y, width = width,
                            box_gp = box_gp_green, txt_gp = txt_gp)
group6_completed <- boxGrob(filter(consort, group == 6)$completed_label, 
                            x = xs[6], y = completed_y, width = width,
                            box_gp = box_gp_green, txt_gp = txt_gp)
group7_completed <- boxGrob(filter(consort, group == 7)$completed_label, 
                            x = xs[7], y = completed_y, width = width,
                            box_gp = box_gp_green, txt_gp = txt_gp)
group8_completed <- boxGrob(filter(consort, group == 8)$completed_label, 
                            x = xs[8], y = completed_y, width = width,
                            box_gp = box_gp_green, txt_gp = txt_gp)

total_random_connect <- connectGrob(total, randomized, "v")
total_ineligible_connect <- connectGrob(total, ineligible, "-")

rand_connect1 <- connectGrob(randomized, group1, "N")
rand_connect2 <- connectGrob(randomized, group2, "N")
rand_connect3 <- connectGrob(randomized, group3, "N")
rand_connect4 <- connectGrob(randomized, group4, "N")
rand_connect5 <- connectGrob(randomized, group5, "N")
rand_connect6 <- connectGrob(randomized, group6, "N")
rand_connect7 <- connectGrob(randomized, group7, "N")
rand_connect8 <- connectGrob(randomized, group8, "N")

complete_connect1 <- connectGrob(group1, group1_completed, "N")
complete_connect2 <- connectGrob(group2, group2_completed, "N")
complete_connect3 <- connectGrob(group3, group3_completed, "N")
complete_connect4 <- connectGrob(group4, group4_completed, "N")
complete_connect5 <- connectGrob(group5, group5_completed, "N")
complete_connect6 <- connectGrob(group6, group6_completed, "N")
complete_connect7 <- connectGrob(group7, group7_completed, "N")
complete_connect8 <- connectGrob(group8, group8_completed, "N")

full_chart <- list(total, randomized, ineligible, total_random_connect, total_ineligible_connect,
                   group1, group2, group3, group4, group5, group6, group7, group8,
                   rand_connect1, rand_connect2, rand_connect3, rand_connect4, 
                   rand_connect5, rand_connect6, rand_connect7, rand_connect8,
                   group1_completed, group2_completed, group3_completed, group4_completed, 
                   group5_completed, group6_completed, group7_completed, group8_completed,
                   complete_connect1, complete_connect2, complete_connect3, complete_connect4, 
                   complete_connect5, complete_connect6, complete_connect7, complete_connect8) 

Characteristics of experiment samples

We compare our sample with demographic characteristics of the general population. Since there is no nationally representative sample for each of our demographic variables, we use two waves of the US Census’s Current Population Survey (CPS), with data from the Minnesota Population Center’s Integrated Public Use Microdata Series (IPUMS).

For general demographic information, we use data from the 2017 Annual Social and Economic Supplement (ASEC) for the CPS. From 2002–2015, the CPS included a Volunteer Supplement every September, so we use 2015 data for data on volunteering and donating to charity.

IPUMS requires that you manually generate a data extract through their website, so downloading data from them is not entirely automated or reproducible. We created two extracts (though this could have been combined into one), with the following variables

  • "data/raw_data/ipums-cps/cps_2017.dat.gz": 2017 ASEC, with the following variables selected (in addition to whatever IPUMS preselects by default) (and weighted by ASECWT):
    • AGE
    • SEX
    • EDUC
    • INCTOT
  • "data/raw_data/ipums-cps/cps_09_2015.dat.gz": September 2015 basic monthly CPS (which includes the Volunteer Supplement), with the following variables selected (and weighted by VLSUPPWT):
    • VLSTATUS
    • VLDONATE

We do not show other respondent demographic details because we don’t have good population-level data to compare our sample with. We could theoretically use Pew data for political preferences, but they collect data on party affiliation, while we collected data about respondent positions along a conservative–liberal spectrum, so the two variables aren’t comparable.

Characteristics of experimental sample {#tbl:exp-sample}
Variable Sample National median 95% HPDI
Female (%)a 54.8% 51.0% 3.8% (-0.4%, 8%)
Age (% 35+)a 47.3% 53.9% -6.6% (-10.8%, -2.4%)
Income (% $50,000+)a 50.4% 27.4% 21.7% (17.4%, 25.8%)
Education (% BA+)a 46.1% 29.9% 16.3% (11.9%, 20.2%)
Donated in past year (%)b 82.5% 48.8% 33.6% (30.2%, 36.7%)
Volunteered in past year (%)b 54.2% 75.1% -20.9% (-25%, -16.6%)
aAnnual CPS, March 2017
bMonthly CPS, September 2015
National value is outside the sample highest posterior density interval (HPDI)

Original computing environment

## # http://dirk.eddelbuettel.com/blog/2017/11/27/#011_faster_package_installation_one
## VER=
## CCACHE=ccache
## CC=$(CCACHE) gcc$(VER)
## CXX=$(CCACHE) g++$(VER)
## CXXFLAGS=-O3 -Wno-unused-variable -Wno-unused-function -Wno-unused-local-typedefs
## CXX11=$(CCACHE) g++$(VER)
## CXX14=$(CCACHE) g++$(VER)
## FLIBS = -L`gfortran -print-file-name=libgfortran.dylib | xargs dirname`
## FC=$(CCACHE) gfortran$(VER)
## F77=$(CCACHE) gfortran$(VER)
## ─ Session info ──────────────────────────────────────────────────────────
##  setting  value                       
##  version  R version 3.5.2 (2018-12-20)
##  os       macOS Mojave 10.14.3        
##  system   x86_64, darwin15.6.0        
##  ui       X11                         
##  language (EN)                        
##  collate  en_US.UTF-8                 
##  ctype    en_US.UTF-8                 
##  tz       America/Denver              
##  date     2019-03-13                  
## 
## ─ Packages ──────────────────────────────────────────────────────────────
##  package                * version    date       lib
##  abind                    1.4-5      2016-07-21 [1]
##  acepack                  1.4.1      2016-10-29 [1]
##  assertthat               0.2.0      2017-04-11 [1]
##  backports                1.1.3      2018-12-14 [1]
##  base64enc                0.1-3      2015-07-28 [1]
##  bindr                    0.1.1      2018-03-13 [1]
##  bindrcpp               * 0.2.2      2018-03-29 [1]
##  broom                  * 0.5.1      2018-12-05 [1]
##  callr                    3.1.1      2018-12-21 [1]
##  cellranger               1.1.0      2016-07-27 [1]
##  checkmate                1.9.1      2019-01-15 [1]
##  cli                      1.0.1      2018-09-25 [1]
##  cluster                  2.0.7-1    2018-04-13 [1]
##  codetools                0.2-15     2016-10-05 [1]
##  colorspace               1.4-0      2019-01-13 [1]
##  crackdownsphilanthropy * 0.0.0.9000 2019-03-13 [1]
##  crayon                   1.3.4      2017-09-16 [1]
##  data.table               1.12.0     2019-01-13 [1]
##  desc                     1.2.0      2018-05-01 [1]
##  devtools                 2.0.1      2018-10-26 [1]
##  digest                   0.6.18     2018-10-10 [1]
##  dplyr                  * 0.7.8      2018-11-10 [1]
##  evaluate                 0.13       2019-02-12 [1]
##  forcats                * 0.3.0      2018-02-19 [1]
##  foreign                  0.8-71     2018-07-20 [1]
##  forestplot               1.7.2      2017-09-16 [1]
##  Formula                  1.2-3      2018-05-03 [1]
##  fs                       1.2.6      2018-08-23 [1]
##  generics                 0.0.2      2018-11-29 [1]
##  ggplot2                * 3.1.0      2018-10-25 [1]
##  glue                   * 1.3.0.9000 2019-02-09 [1]
##  Gmisc                  * 1.8        2019-01-09 [1]
##  gridExtra              * 2.3        2017-09-09 [1]
##  gtable                   0.2.0      2016-02-26 [1]
##  haven                    2.0.0      2018-11-22 [1]
##  here                   * 0.1        2017-05-28 [1]
##  hipread                  0.1.1      2018-08-02 [1]
##  Hmisc                    4.1-1      2018-01-03 [1]
##  hms                      0.4.2      2018-03-10 [1]
##  htmlTable              * 1.13.1     2019-01-07 [1]
##  htmltools                0.3.6      2017-04-28 [1]
##  htmlwidgets              1.3        2018-09-30 [1]
##  httr                     1.4.0      2018-12-11 [1]
##  inline                   0.3.15     2018-05-18 [1]
##  ipumsr                 * 0.3.0      2018-09-27 [1]
##  jsonlite                 1.6        2018-12-07 [1]
##  knitr                    1.21       2018-12-10 [1]
##  labeling                 0.3        2014-08-23 [1]
##  lattice                  0.20-38    2018-11-04 [1]
##  latticeExtra             0.6-28     2016-02-09 [1]
##  lazyeval                 0.2.1      2017-10-29 [1]
##  loo                      2.0.0      2018-04-11 [1]
##  lubridate                1.7.4      2018-04-11 [1]
##  magrittr               * 1.5        2014-11-22 [1]
##  Matrix                   1.2-15     2018-11-01 [1]
##  matrixStats              0.54.0     2018-07-23 [1]
##  memoise                  1.1.0      2017-04-21 [1]
##  modelr                   0.1.2      2018-05-11 [1]
##  munsell                  0.5.0      2018-06-12 [1]
##  nlme                     3.1-137    2018-04-07 [1]
##  nnet                     7.3-12     2016-02-02 [1]
##  pander                 * 0.6.3      2018-11-06 [1]
##  pillar                   1.3.1      2018-12-15 [1]
##  pkgbuild                 1.0.2      2018-10-16 [1]
##  pkgconfig                2.0.2      2018-08-16 [1]
##  pkgload                  1.0.2      2018-10-29 [1]
##  plyr                     1.8.4      2016-06-08 [1]
##  prettyunits              1.0.2      2015-07-13 [1]
##  processx                 3.2.1.9000 2019-03-07 [1]
##  ps                       1.3.0      2018-12-21 [1]
##  purrr                  * 0.3.1      2019-03-03 [1]
##  R6                       2.4.0      2019-02-14 [1]
##  RColorBrewer             1.1-2      2014-12-07 [1]
##  Rcpp                   * 1.0.0      2018-11-07 [1]
##  readr                  * 1.3.1      2018-12-21 [1]
##  readxl                   1.2.0      2018-12-19 [1]
##  remotes                  2.0.2      2018-10-30 [1]
##  rlang                    0.3.1      2019-01-08 [1]
##  rmarkdown                1.11       2018-12-08 [1]
##  rpart                    4.1-13     2018-02-23 [1]
##  rprojroot                1.3-2      2018-01-03 [1]
##  rstan                  * 2.18.2     2018-11-07 [1]
##  rstantools               1.5.1      2018-08-22 [1]
##  rstudioapi               0.9.0      2019-01-09 [1]
##  rvest                    0.3.2      2016-06-17 [1]
##  scales                 * 1.0.0      2018-08-09 [1]
##  sessioninfo              1.1.1      2018-11-05 [1]
##  StanHeaders            * 2.18.1     2019-01-28 [1]
##  stringi                  1.3.1      2019-02-13 [1]
##  stringr                * 1.4.0      2019-02-10 [1]
##  survival                 2.43-3     2018-11-26 [1]
##  testthat                 2.0.1      2018-10-13 [1]
##  tibble                 * 2.0.1      2019-01-12 [1]
##  tidyr                  * 0.8.2      2018-10-28 [1]
##  tidyselect               0.2.5      2018-10-11 [1]
##  tidyverse              * 1.2.1      2017-11-14 [1]
##  usethis                  1.4.0      2018-08-14 [1]
##  withr                    2.1.2      2018-03-15 [1]
##  xfun                     0.5        2019-02-20 [1]
##  XML                      3.98-1.16  2018-08-19 [1]
##  xml2                     1.2.0      2018-01-24 [1]
##  yaml                     2.2.0      2018-07-25 [1]
##  zeallot                  0.1.0      2018-01-28 [1]
##  source                          
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.2)                  
##  local                           
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  Github (tidyverse/glue@8188cea) 
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  Github (r-pkgs/processx@823819d)
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.2)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
##  CRAN (R 3.5.0)                  
## 
## [1] /Library/Frameworks/R.framework/Versions/3.5/Resources/library
LS0tCnRpdGxlOiAiQWRkaXRpb25hbCBhbmFseXNpcyIKYXV0aG9yOiAiQW5kcmV3IEhlaXNzIGFuZCBTdXBhcm5hIENoYXVkaHJ5IgpkYXRlOiAiTGFzdCBydW46IGByIGZvcm1hdChTeXMudGltZSgpLCAnJUIgJWUsICVZJylgIgpvdXRwdXQ6IAogIGh0bWxfZG9jdW1lbnQ6CiAgICBjb2RlX2ZvbGRpbmc6IGhpZGUKZWRpdG9yX29wdGlvbnM6IAogIGNodW5rX291dHB1dF90eXBlOiBjb25zb2xlCi0tLQoKYGBge3IgbG9hZC1saWJyYXJpZXMtZGF0YSwgd2FybmluZz1GQUxTRSwgbWVzc2FnZT1GQUxTRX0KIyBMb2FkIGxpYn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0ZWRfeSwgd2lkdGggPSB3aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveF9ncCA9IGJveF9ncF9ncmVlbiwgdHh0X2dwID0gdHh0X2dwKQpncm91cDJfY29tcGxldGVkIDwtIGJveEdyb2IoZmlsdGVyKGNvbnNvcnQsIGdyb3VwID09IDIpJGNvbXBsZXRlZF9sYWJlbCwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0geHNbMl0sIHkgPSBjb21wbGV0ZWRfeSwgd2lkdGggPSB3aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveF9ncCA9IGJveF9ncF9ncmVlbiwgdHh0X2dwID0gdHh0X2dwKQpncm91cDNfY29tcGxldGVkIDwtIGJveEdyb2IoZmlsdGVyKGNvbnNvcnQsIGdyb3VwID09IDMpJGNvbXBsZXRlZF9sYWJlbCwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0geHNbM10sIHkgPSBjb21wbGV0ZWRfeSwgd2lkdGggPSB3aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveF9ncCA9IGJveF9ncF9ncmVlbiwgdHh0X2dwID0gdHh0X2dwKQpncm91cDRfY29tcGxldGVkIDwtIGJveEdyb2IoZmlsdGVyKGNvbnNvcnQsIGdyb3VwID09IDQpJGNvbXBsZXRlZF9sYWJlbCwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0geHNbNF0sIHkgPSBjb21wbGV0ZWRfeSwgd2lkdGggPSB3aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveF9ncCA9IGJveF9ncF9ncmVlbiwgdHh0X2dwID0gdHh0X2dwKQpncm91cDVfY29tcGxldGVkIDwtIGJveEdyb2IoZmlsdGVyKGNvbnNvcnQsIGdyb3VwID09IDUpJGNvbXBsZXRlZF9sYWJlbCwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0geHNbNV0sIHkgPSBjb21wbGV0ZWRfeSwgd2lkdGggPSB3aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveF9ncCA9IGJveF9ncF9ncmVlbiwgdHh0X2dwID0gdHh0X2dwKQpncm91cDZfY29tcGxldGVkIDwtIGJveEdyb2IoZmlsdGVyKGNvbnNvcnQsIGdyb3VwID09IDYpJGNvbXBsZXRlZF9sYWJlbCwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0geHNbNl0sIHkgPSBjb21wbGV0ZWRfeSwgd2lkdGggPSB3aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveF9ncCA9IGJveF9ncF9ncmVlbiwgdHh0X2dwID0gdHh0X2dwKQpncm91cDdfY29tcGxldGVkIDwtIGJveEdyb2IoZmlsdGVyKGNvbnNvcnQsIGdyb3VwID09IDcpJGNvbXBsZXRlZF9sYWJlbCwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0geHNbN10sIHkgPSBjb21wbGV0ZWRfeSwgd2lkdGggPSB3aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveF9ncCA9IGJveF9ncF9ncmVlbiwgdHh0X2dwID0gdHh0X2dwKQpncm91cDhfY29tcGxldGVkIDwtIGJveEdyb2IoZmlsdGVyKGNvbnNvcnQsIGdyb3VwID09IDgpJGNvbXBsZXRlZF9sYWJlbCwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0geHNbOF0sIHkgPSBjb21wbGV0ZWRfeSwgd2lkdGggPSB3aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveF9ncCA9IGJveF9ncF9ncmVlbiwgdHh0X2dwID0gdHh0X2dwKQoKdG90YWxfcmFuZG9tX2Nvbm5lY3QgPC0gY29ubmVjdEdyb2IodG90YWwsIHJhbmRvbWl6ZWQsICJ2IikKdG90YWxfaW5lbGlnaWJsZV9jb25uZWN0IDwtIGNvbm5lY3RHcm9iKHRvdGFsLCBpbmVsaWdpYmxlLCAiLSIpCgpy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