BGU Step12019-03-05T10:41:25+00:00

Welcome BGU Class of 2021

Using Brosencephalon Effectively for USMLE Studying

By |April 22nd, 2019|Categories: featured, Flashcard Resources, Flashcards, Resource Reviews, USMLE Step 1|Tags: |

6 Tips on Using Anki USMLE Flashcards

By |April 18th, 2019|Categories: featured, Flashcard Resources, Flashcards, Resource Reviews, Uncategorized, USMLE Step 1|Tags: , , |

Load More Posts

Common Questions

Have a Question? Please submit it to info@elitemedicalprep.com

BGU 2nd Year Student

Posted: May 10,2018 @4:25 am

Hi, I’ve got 2 questions about test dates. My first question is regarding choosing the date for Step 1. I am deciding between dates that are close together (July 25th and July 30th, 2018). However, the earlier date would permit me the longer vacation during which I could fly home to the US. Since we end the school year June 12th, my decision is really a question of having 6 weeks or 7ish weeks of studying. I don’t feel like I can determine how I’m going to feel or what my scores will look like after 6 weeks of studying vs. 7 weeks. Is there a good way to get of sense how much time we will need in hindsight?

My second question: are there ever instances when someone would move their exam to an earlier date? Maybe if they feel that they are filled to the brim with knowledge and content with their scores on practice exams a week or so before the date?

Marcel Brus-Ramer, MD

BGU 2nd Year Student

Hi, I’ve got 2 questions about test dates. My first question is regarding choosing the date for Step 1. I am deciding...

Posted: May 12, 2018 @12:00 am


Great questions! Moving your test date is something you should do carefully.  In determining where your test date should be you need to assess your current performance, your score goal, and the score 'you can live with'.  The 'you can live with score' is sort of the point below which you would tell yourself that you absolutely would go through all of the difficulty of Step 1 studying again in order to improve. Right now I would probably choose the 7 weeks of studying unless you are within 20 points of your score goal as of say June 1st. This is definitely an estimate. One of the reasons I might choose the later date is that you can, in fact, move up your test date if you are really meeting and exceeding your score goal. It does happen and can be good if you are well ahead of pace.  Burnout is a real thing so waiting too long to take your test after you are ready can be detrimental. I think choosing the later test date also sets you up to get either no benefit (not moving up your score and not going to the US) or a big benefit (feeling good about yourself and moving up your date), rather than the opposite situation where you expect to go to the US but then have to cancel (a total bummer).

Testdate, Studyperiod

BGU 2nd Year Student

Posted: May 1,2018 @4:25 am

What specific role does ACh play in the striatum— excitatory or inhibitory? Which pathway(s) does ACh affect— direct or indirect?

Karolina Woroniecka

BGU 2nd Year Student

What specific role does ACh play in the striatum— excitatory or inhibitory? Which pathway(s) does ACh affect— direct...

Posted: May 3, 2018 @6:50 am


The striatum is a nodal structure of the basal ganglia circuits and is one of the brain areas with the highest concentration of markers of cholinergic transmission. Giant aspiny cholinergic interneurons constitute only 1%–3% of the neurons of the striatum but exert a powerful influence on its output, which is mediated by the medium spiny neurons (MSNs). ACh, acting via different receptor subtypes, affects the activity of the MSNs both directly and via modulation of glutamate release from corticostriate terminals and of dopamine release from nigrostriatal terminals. Acetylcholine, via its reciprocal interactions with dopamine (DA), has an important role in the differential modulation of striatal output via the so-called direct and indirect pathways of the basal ganglia circuits. The excitatory M1 and the inhibitory M4 receptors are the main cholinergic receptors in MSNs; both the inhibitory M2/M4 and the excitatory nACRs are expressed in presynaptic glutamatergic and dopaminergic terminals.

Striatum, ACh

BGU 2nd Year Student

Posted: April 27,2018 @4:25 am

What is the role of phosphoinositides in the body and why is their turnover an important component of some drugs?

Karolina Woroniecka

BGU 2nd Year Student

What is the role of phosphoinositides in the body and why is their turnover an important component of some drugs?

Posted: April 28, 2018 @6:07 pm


Phosphoinositides (PIs) make up only a small fraction of cellular phospholipids, yet they control almost all aspects of a cell's life and death. A wide range of biological processes are regulated by PIs, turning these lipids into one of the most universal signaling entities in eukaryotic cells. PIs control organelle biology by regulating vesicular trafficking, but they also modulate lipid distribution and metabolism via their close relationship with lipid transfer proteins. PIs regulate ion channels, pumps, and transporters and control both endocytic and exocytic processes. As expected from such pleiotropic regulators, derangements of phosphoinositide metabolism are responsible for a number of human diseases ranging from rare genetic disorders to the most common ones such as cancer, obesity, and diabetes. Moreover, it is increasingly evident that a number of infectious agents hijack the PI regulatory systems of host cells for their intracellular movements, replication, and assembly. As a result, PI converting enzymes began to be noticed by pharmaceutical companies as potential therapeutic targets. For Step 1, PI's are primarily relevant in the signaling pathway downstream of Gq receptor, where PIP2 -> IP3 and DAG, leading to smooth muscle contractions.

Phosphoinositides

BGU 2nd Year Student

Posted: April 14,2018 @4:25 am

Is it the accumulation of d-ALA and protopophryin what causes the symptoms of lead poisoning or does the lead act independently in cells/other biochemical processes?

Karolina Woroniecka

BGU 2nd Year Student

Is it the accumulation of d-ALA and protopophryin what causes the symptoms of lead poisoning or does the lead act independently...

Posted: April 15, 2018 @2:29 pm


The primary cause of lead's toxicity is its interference with a variety of enzymes because it binds to sulfhydryl groups found on many enzymes. Part of lead's toxicity results from its ability to mimic other metals that take part in biological processes, which act as cofactors in many enzymatic reactions, displacing them at the enzymes on which they act. Inhibition of d-ALA dehydrates and ferrochelatase lead to accumulation of d-ALA and protoporphyrin. This inhibits heme synthesis and results in anemia. These precursors may also be directly toxic to neurons. However, lead also acts through other processes to result in neurotoxicity: Lead is able to pass through the endothelial cells at the blood brain barrier because it can substitute for calcium ions and be uptaken by calcium-ATPase pumps. Furthermore, lead also inhibits NMDA receptors.

Protopophryin, Neurotoxicity, Lead poisoning, D-ALA

BGU 2nd Year Student

Posted: April 12,2018 @4:25 am

How do antibiotics prolong the duration that bacteria are excreted in stool for nontyphoidal salmonellosis? What is the mechanism?

Karolina Woroniecka

BGU 2nd Year Student

How do antibiotics prolong the duration that bacteria are excreted in stool for nontyphoidal salmonellosis? What is the...

Posted: April 14, 2018 @10:47 pm


Nelson and colleagues' early study of children with salmonellosis showed that those who were treated with ampicillin or amoxicillin were more likely to have both prolonged excretion and clinical relapse than were those who were given placebo. Animal studies support the hypothesis that antibiotics do this by suppressing the “protective” effects of endogenous intestinal bacterial flora, which results in recrudescence of the hardy Salmonella species. Many clinicians are not aware that the median duration of fecal shedding of nontyphoidal salmonellae after intestinal infection is ∼1 month in adults and 7 weeks in children <5 years of age.

Salmonellosis, Nontyphoidal, Antibiotics

BGU 2nd Year Student

Posted: April 4,2018 @4:25 am

Are non-caseating granulomas unique to sarcoidosis? Or do all auto-inflammatory causes of granulomas display non-caseating granulomas? Along the same lines, do all infectious causes of granulomas display caseating granulomas or is it only TB?

Karolina Woroniecka

BGU 2nd Year Student

Are non-caseating granulomas unique to sarcoidosis? Or do all auto-inflammatory causes of granulomas display non-caseating...

Posted: April 6, 2018 @12:12 pm


The most common cause of all granuloma formation worldwide is tuberculosis. The formation of granulomas in tuberculosis is thought to be a physiological reaction to prevent the systemic spread of the causative pathogen, the mycobacterium. is immune response typically results in a caseating granuloma with signs of necrosis. Many other infectious agents can trigger granuloma formation as well as foreign body material such as beryllium, and inherited defects in neutrophil function (chronic granulomatous disease). In chronic inflammatory diseases and primary immunodeficiencies with chronic inflammation, the granulomas have not been associated with specific external agents. With the exception of granulomatosis with polyangiitis, these granulomas are non-caseating and typically observed in patients with sarcoidosis, Crohn's disease and common variable immunodeficiency. Sarcoidosis remains a diagnosis of exclusion.

Tuberculosis, Sarcoidosis, Non-caseating, Granulomas, Auto inflammatory

BGU 2nd Year Student

Posted: March 20,2018 @4:25 am

I have a few questions regarding last weeks class and my study plan. Collaborating with a classmate of mine, we have made a schedule for Step studying for the period of March to mid-June when dedicated begins. We plan to review one topic per week until the end of the semester. I also think it might be useful for you to know that since most of our exams have been NBME-style, most of my classmates, including myself, have been using some question bank since the first semester of medical school.

During this spring semester, do you suggest doing sets of questions only regarding the topic we are currently reviewing? Or, do you suggest starting right away with sets of random-topic questions? Or both?

My second question regarding USMLE-World is, how concerned should we be about percentage correct in USMLE-World. My overall average is 60% correct. How should I move forward if I do poorly on a set of questions? What about if I understand the incorrect answers?

My last question was partially addressed in class. If we are using USMLE-world to prepare for exams this year, does this count towards the first “round” of completing USMLE-world?

Ken Rubin, MD

BGU 2nd Year Student

I have a few questions regarding last weeks class and my study plan. Collaborating with a classmate of mine, we have made...

Posted: March 22, 2018 @4:28 am


  1. We like starting with topic-based questions for the first pass and then moving to mixed blocks for the second pass.
  2. 60% is fine. Focus more on learning from the explanations than percent correct. If you perform poorly on a set of questions, you may want to take longer reviewing the blocks and studying up on topics that caused you difficulty.
  3. You should still aim to complete Uworld twice--first by topic and then mixed. Working through a qbank from early in med school is generally a smart move. But we wouldn't necessarily say that counts as a first pass because the work is so spread out. Working through a high volume of topic-focused questions in a relatively short amount of time helps you see the patterns/nuances in that topic and keep it all in your head. Then mixed is helpful because it adds another layer of complexity and difficulty in that it that forces you to switch from topic to topic and identify what is being asked. That mimics the test day experience.

Uworld, Tips, Study schedule, Practice questions

BGU 2nd Year Student

Posted: January 7,2018 @4:25 am

I have pretty bad test anxiety. Typically when I study for an exam, I use UWorld and do very well on practice exams up until the day before the test. The day before the exam I get very nervous. This carries over to the day of the exam and during the exam I freeze, leading to second guessing a lot of my answers.

Do you have any suggestions for how I can work to improve this?

Marcel Brus-Ramer, MD

BGU 2nd Year Student

I have pretty bad test anxiety. Typically when I study for an exam, I use UWorld and do very well on practice exams up...

Posted: January 9, 2018 @5:18 am


It's natural to feel anxiety when answering these tricky questions with all the high stakes. Here are a few tips to consider:

  1. Take practice Uworld sets TIMED and in non-private locations. This extra stress is helpful because it mimics what you might face on the real exam. Even having some ambient nose can be helpful because it makes the process more challenging and that's what you want.
  2. To become more confident when you're answering questions, follow a structured question breakdown approach like the 1-2-3-4 step Elite approach that we showed you in one of the lectures. The repetition and consistency build confidence and decrease the chance you'll make doubt yourself and/or make a careless error. An important element of the standardized approach is Step 3 ("summarize the prompt"). Forcing yourself to summarize each prompt is a great exercise for boards and wards. You'll find yourself more confident that you know what you're doing --> you are less likely to change your answer.
  3. Generally you want to trust your instincts and avoid changing answers at the last second. While you certainly want to be able to explicitly talk out why you're picking each answer, one of the benefits of doing thousands of practice questions is that your brain starts to recognize the history and laboratory patterns that make up any vignette and almost subconsciously come up with the right answer. Trust your brain! Even if your instincts are occasionally off, remember you don't need to be perfect: as long as you answer enough questions correctly, you can pass the test and even do well.

Tips, Testanxiety

BGU Class of 2021

TOPIC SEARCH

BGU 2nd Year Student
Posted:May 10,2018 @4:25 am

Hi, I’ve got 2 questions about test dates. My first question is regarding choosing the date for Step 1. I am deciding between dates that are close together (July 25th and July 30th, 2018). However, the earlier date would permit me the longer vacation during which I could fly home to the US. Since we end the school year June 12th, my decision is really a question of having 6 weeks or 7ish weeks of studying. I don’t feel like I can determine how I’m going to feel or what my scores will look like after 6 weeks of studying vs. 7 weeks. Is there a good way to get of sense how much time we will need in hindsight?

My second question: are there ever instances when someone would move their exam to an earlier date? Maybe if they feel that they are filled to the brim with knowledge and content with their scores on practice exams a week or so before the date?

Marcel Brus-Ramer, MD
Posted: May 12, 2018 @12:00 am
BGU 2nd Year Student

Hi, I’ve got 2 questions about test dates. My first question is regarding choosing the...

Great questions! Moving your test date is something you should do carefully.  In determining where your test date should be you need to assess your current performance, your score goal, and the score 'you can live with'.  The 'you can live with score' is sort of the point below which you would tell yourself that you absolutely would go through all of the difficulty of Step 1 studying again in order to improve. Right now I would probably choose the 7 weeks of studying unless you are within 20 points of your score goal as of say June 1st. This is definitely an estimate. One of the reasons I might choose the later date is that you can, in fact, move up your test date if you are really meeting and exceeding your score goal. It does happen and can be good if you are well ahead of pace.  Burnout is a real thing so waiting too long to take your test after you are ready can be detrimental. I think choosing the later test date also sets you up to get either no benefit (not moving up your score and not going to the US) or a big benefit (feeling good about yourself and moving up your date), rather than the opposite situation where you expect to go to the US but then have to cancel (a total bummer).

Testdate, Studyperiod

BGU 2nd Year Student
Posted:May 1,2018 @4:25 am

What specific role does ACh play in the striatum— excitatory or inhibitory? Which pathway(s) does ACh affect— direct or indirect?

Karolina Woroniecka
Posted: May 3, 2018 @6:50 am
BGU 2nd Year Student

What specific role does ACh play in the striatum— excitatory or inhibitory? Which pathway(s)...

The striatum is a nodal structure of the basal ganglia circuits and is one of the brain areas with the highest concentration of markers of cholinergic transmission. Giant aspiny cholinergic interneurons constitute only 1%–3% of the neurons of the striatum but exert a powerful influence on its output, which is mediated by the medium spiny neurons (MSNs). ACh, acting via different receptor subtypes, affects the activity of the MSNs both directly and via modulation of glutamate release from corticostriate terminals and of dopamine release from nigrostriatal terminals. Acetylcholine, via its reciprocal interactions with dopamine (DA), has an important role in the differential modulation of striatal output via the so-called direct and indirect pathways of the basal ganglia circuits. The excitatory M1 and the inhibitory M4 receptors are the main cholinergic receptors in MSNs; both the inhibitory M2/M4 and the excitatory nACRs are expressed in presynaptic glutamatergic and dopaminergic terminals.

Striatum, ACh

BGU 2nd Year Student
Posted:April 27,2018 @4:25 am

What is the role of phosphoinositides in the body and why is their turnover an important component of some drugs?

Karolina Woroniecka
Posted: April 28, 2018 @6:07 pm
BGU 2nd Year Student

What is the role of phosphoinositides in the body and why is their turnover an important...

Phosphoinositides (PIs) make up only a small fraction of cellular phospholipids, yet they control almost all aspects of a cell's life and death. A wide range of biological processes are regulated by PIs, turning these lipids into one of the most universal signaling entities in eukaryotic cells. PIs control organelle biology by regulating vesicular trafficking, but they also modulate lipid distribution and metabolism via their close relationship with lipid transfer proteins. PIs regulate ion channels, pumps, and transporters and control both endocytic and exocytic processes. As expected from such pleiotropic regulators, derangements of phosphoinositide metabolism are responsible for a number of human diseases ranging from rare genetic disorders to the most common ones such as cancer, obesity, and diabetes. Moreover, it is increasingly evident that a number of infectious agents hijack the PI regulatory systems of host cells for their intracellular movements, replication, and assembly. As a result, PI converting enzymes began to be noticed by pharmaceutical companies as potential therapeutic targets. For Step 1, PI's are primarily relevant in the signaling pathway downstream of Gq receptor, where PIP2 -> IP3 and DAG, leading to smooth muscle contractions.

Phosphoinositides

BGU 2nd Year Student
Posted:April 14,2018 @4:25 am

Is it the accumulation of d-ALA and protopophryin what causes the symptoms of lead poisoning or does the lead act independently in cells/other biochemical processes?

Karolina Woroniecka
Posted: April 15, 2018 @2:29 pm
BGU 2nd Year Student

Is it the accumulation of d-ALA and protopophryin what causes the symptoms of lead poisoning...

The primary cause of lead's toxicity is its interference with a variety of enzymes because it binds to sulfhydryl groups found on many enzymes. Part of lead's toxicity results from its ability to mimic other metals that take part in biological processes, which act as cofactors in many enzymatic reactions, displacing them at the enzymes on which they act. Inhibition of d-ALA dehydrates and ferrochelatase lead to accumulation of d-ALA and protoporphyrin. This inhibits heme synthesis and results in anemia. These precursors may also be directly toxic to neurons. However, lead also acts through other processes to result in neurotoxicity: Lead is able to pass through the endothelial cells at the blood brain barrier because it can substitute for calcium ions and be uptaken by calcium-ATPase pumps. Furthermore, lead also inhibits NMDA receptors.

Protopophryin, Neurotoxicity, Lead poisoning, D-ALA

BGU 2nd Year Student
Posted:April 12,2018 @4:25 am

How do antibiotics prolong the duration that bacteria are excreted in stool for nontyphoidal salmonellosis? What is the mechanism?

Karolina Woroniecka
Posted: April 14, 2018 @10:47 pm
BGU 2nd Year Student

How do antibiotics prolong the duration that bacteria are excreted in stool for nontyphoidal...

Nelson and colleagues' early study of children with salmonellosis showed that those who were treated with ampicillin or amoxicillin were more likely to have both prolonged excretion and clinical relapse than were those who were given placebo. Animal studies support the hypothesis that antibiotics do this by suppressing the “protective” effects of endogenous intestinal bacterial flora, which results in recrudescence of the hardy Salmonella species. Many clinicians are not aware that the median duration of fecal shedding of nontyphoidal salmonellae after intestinal infection is ∼1 month in adults and 7 weeks in children <5 years of age.

Salmonellosis, Nontyphoidal, Antibiotics

BGU 2nd Year Student
Posted:April 4,2018 @4:25 am

Are non-caseating granulomas unique to sarcoidosis? Or do all auto-inflammatory causes of granulomas display non-caseating granulomas? Along the same lines, do all infectious causes of granulomas display caseating granulomas or is it only TB?

Karolina Woroniecka
Posted: April 6, 2018 @12:12 pm
BGU 2nd Year Student

Are non-caseating granulomas unique to sarcoidosis? Or do all auto-inflammatory causes of...

The most common cause of all granuloma formation worldwide is tuberculosis. The formation of granulomas in tuberculosis is thought to be a physiological reaction to prevent the systemic spread of the causative pathogen, the mycobacterium. is immune response typically results in a caseating granuloma with signs of necrosis. Many other infectious agents can trigger granuloma formation as well as foreign body material such as beryllium, and inherited defects in neutrophil function (chronic granulomatous disease). In chronic inflammatory diseases and primary immunodeficiencies with chronic inflammation, the granulomas have not been associated with specific external agents. With the exception of granulomatosis with polyangiitis, these granulomas are non-caseating and typically observed in patients with sarcoidosis, Crohn's disease and common variable immunodeficiency. Sarcoidosis remains a diagnosis of exclusion.

Tuberculosis, Sarcoidosis, Non-caseating, Granulomas, Auto inflammatory

BGU 2nd Year Student
Posted:March 20,2018 @4:25 am

I have a few questions regarding last weeks class and my study plan. Collaborating with a classmate of mine, we have made a schedule for Step studying for the period of March to mid-June when dedicated begins. We plan to review one topic per week until the end of the semester. I also think it might be useful for you to know that since most of our exams have been NBME-style, most of my classmates, including myself, have been using some question bank since the first semester of medical school.

During this spring semester, do you suggest doing sets of questions only regarding the topic we are currently reviewing? Or, do you suggest starting right away with sets of random-topic questions? Or both?

My second question regarding USMLE-World is, how concerned should we be about percentage correct in USMLE-World. My overall average is 60% correct. How should I move forward if I do poorly on a set of questions? What about if I understand the incorrect answers?

My last question was partially addressed in class. If we are using USMLE-world to prepare for exams this year, does this count towards the first “round” of completing USMLE-world?

Ken Rubin, MD
Posted: March 22, 2018 @4:28 am
BGU 2nd Year Student

I have a few questions regarding last weeks class and my study plan. Collaborating with...

  1. We like starting with topic-based questions for the first pass and then moving to mixed blocks for the second pass.
  2. 60% is fine. Focus more on learning from the explanations than percent correct. If you perform poorly on a set of questions, you may want to take longer reviewing the blocks and studying up on topics that caused you difficulty.
  3. You should still aim to complete Uworld twice--first by topic and then mixed. Working through a qbank from early in med school is generally a smart move. But we wouldn't necessarily say that counts as a first pass because the work is so spread out. Working through a high volume of topic-focused questions in a relatively short amount of time helps you see the patterns/nuances in that topic and keep it all in your head. Then mixed is helpful because it adds another layer of complexity and difficulty in that it that forces you to switch from topic to topic and identify what is being asked. That mimics the test day experience.

Uworld, Tips, Study schedule, Practice questions

BGU 2nd Year Student
Posted:January 7,2018 @4:25 am

I have pretty bad test anxiety. Typically when I study for an exam, I use UWorld and do very well on practice exams up until the day before the test. The day before the exam I get very nervous. This carries over to the day of the exam and during the exam I freeze, leading to second guessing a lot of my answers.

Do you have any suggestions for how I can work to improve this?

Marcel Brus-Ramer, MD
Posted: January 9, 2018 @5:18 am
BGU 2nd Year Student

I have pretty bad test anxiety. Typically when I study for an exam, I use UWorld and do...

It's natural to feel anxiety when answering these tricky questions with all the high stakes. Here are a few tips to consider:
  1. Take practice Uworld sets TIMED and in non-private locations. This extra stress is helpful because it mimics what you might face on the real exam. Even having some ambient nose can be helpful because it makes the process more challenging and that's what you want.
  2. To become more confident when you're answering questions, follow a structured question breakdown approach like the 1-2-3-4 step Elite approach that we showed you in one of the lectures. The repetition and consistency build confidence and decrease the chance you'll make doubt yourself and/or make a careless error. An important element of the standardized approach is Step 3 ("summarize the prompt"). Forcing yourself to summarize each prompt is a great exercise for boards and wards. You'll find yourself more confident that you know what you're doing --> you are less likely to change your answer.
  3. Generally you want to trust your instincts and avoid changing answers at the last second. While you certainly want to be able to explicitly talk out why you're picking each answer, one of the benefits of doing thousands of practice questions is that your brain starts to recognize the history and laboratory patterns that make up any vignette and almost subconsciously come up with the right answer. Trust your brain! Even if your instincts are occasionally off, remember you don't need to be perfect: as long as you answer enough questions correctly, you can pass the test and even do well.

Tips, Testanxiety

Welcome Class of 2021!

On this page, you will find links to:
– Webinar registration for each lecture
– Lecture recordings
– Associated lecture notes
Please send questions, comments, and concerns to:
bgu2021@elitemedicalprep.com
 

Lecture 2.1

Delivered on:

October. 29, 2018

Lecture 2.2

Scheduled for:

January 2018

Lecture 2.3

Scheduled for:

March 2019

Download Lecture 2.1 Slides PDF
Class Calendar–In Development

Using Brosencephalon Effectively for USMLE Studying

By |April 22nd, 2019|Categories: featured, Flashcard Resources, Flashcards, Resource Reviews, USMLE Step 1|Tags: |

If you haven't already heard of the Brosencephalon (Bros) deck, it's time to get acquainted! Bros is one of several popular pre-made flashcard decks

6 Tips on Using Anki USMLE Flashcards

By |April 18th, 2019|Categories: featured, Flashcard Resources, Flashcards, Resource Reviews, Uncategorized, USMLE Step 1|Tags: , , |

When it comes to studying for the USMLE, it’s worth learning how to make proper flashcards up front. While there are many different USMLE..

Load More Posts
[fusion_code]PHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPgoKCiAgICAkKGZ1bmN0aW9uICgpIHsKICAgICAgICAkKCIuY29udGVudCIpLnNsaWNlKDAsIDQpLnNob3coKTsKICAgICAgICAkKCIubG9hZE1vcmUiKS5vbignY2xpY2snLCBmdW5jdGlvbiAoZSkgewogICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICQoIi5jb250ZW50OmhpZGRlbiIpLnNsaWNlKDAsIDIpLnNsaWRlRG93bigpOwogICAgICAgICAgICBpZiAoJCgiLmNvbnRlbnQ6aGlkZGVuIikubGVuZ3RoID09IDApIHsKCiAgICAgICAgICAgICAgICAkKCIjbG9hZCIpLmZhZGVPdXQoJ3Nsb3cnKTsKICAgICAgICAgICAgICAgICQoIi5sb2FkTW9yZSIpLmNzcygiZGlzcGxheSIsJ25vbmUnKTsKCgogICAgICAgICAgICAgICAgJCgiLnBvc3Rtc2d0eHQiKS5jc3MoImRpc3BsYXkiLCJibG9jayIpLmZhZGVPdXQoMzAwMCk7CiAgICAgICAgICAgICAvLyAkKCIucmVhZG1vcmUiKS5odG1sKCc8cCBzdHlsZT0iY29sb3I6I2JiMTkyOCI+QWxsIFBvc3RzIGRpc3BsYXllZDwvcD4nKS5mYWRlT3V0KDMwMDApOwogICAgICAgICB9CgogICAgICAgICAkKCdodG1sLGJvZHknKS5hbmltYXRlKHsKCiAgICAgICAgICAgIHNjcm9sbFRvcDogJCh0aGlzKS5vZmZzZXQoKS5kb3duCiAgICAgICAgfSwgMTUwMCk7CiAgICAgfSk7CgogICAgfSk7CgoKCiAgICAkKGZ1bmN0aW9uICgpIHsKICAgICAgICAkKCIuY29udGVudG1vcmUiKS5zbGljZSgwLCAxKS5zaG93KCk7CiAgICAgICAgJCgiLmxvYWRNb3JlMSIpLm9uKCdjbGljaycsIGZ1bmN0aW9uIChlKSB7CiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgJCgiLmNvbnRlbnRtb3JlOmhpZGRlbi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5ldyB0ZXJtCiAgICAgICAgICAgICQoJy5kaXNlYXNlc3RhZ3MnKS5oaWdobGlnaHQoIHNlYXJjaFRlcm0gKTsKICAgICAgICB9CgogICAgICAgICQoJy50YWdfcCcpLmVhY2goZnVuY3Rpb24oKSB7CiAgICAgICAgICAgaWYgKHNlYXJjaFRlcm0ubGVuZ3RoIDwgMSkgewogICAgICAgICAgICAgICQodGhpcykuc2hvdygpOwogICAgICAgICAgICAgIGNvbnNvbGUubG9nKCIxIik7CgoKCiAgICAgIC8vIGRpc2Vhc2VzdGFncwoKICB9IGVsc2UgewogICAgICAkKHRoaXMpLnRvZ2dsZSgkKHRoaXMpLmZpbHRlcignW2RhdGEtc2VhcmNoLXRlcm0qPSInICsgc2VhcmNoVGVybSArICciXSwgW2RhdGEtdGFnKj0iJyArIHNlYXJjaFRlcm0gKyAnIl0nKS5sZW5ndGggPiAwKTsKCiAgICAKCgoKICAgICAgdmFyIGlzQ29udGFpbnMgPSAkKCcuZGlzZWFzZXN0YWdzJykudGV4dCgpLmluZGV4T2Yoc2VhcmNoVGVybSkgPiAtMTsKICAgICAgY29uc29sZS5sb2coaXNDb250YWlucyk7CiAgICAKCiAgICAvLyAkKCAiLmRpc2Vhc2VzdGFnczpjb250YWlucygiK3NlYXJjaFRlcm0rIikiICkuY3NzKCAiYmFja2dyb3VuZC1jb2xvciIsICJ5ZWxsb3ciICk7CgogICAgLy8gICAgICAgICAgICAgICAgICAgICB7CiAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygiRmRmZCIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAkKCcubG9hZE1vcmUxJykuY3NzKCJkaXNwbGF5IiwiYmxvY2siKTsKICAgICAgICAgICAgLy8gJCgnLnR4dG5vdGZvdW5kJykuY3NzKCJkaXNwbGF5IiwiYmxvY2siKTsKCiAgICAvLyAgICAgICAgICAgICAgICAgICAgIH0KICAgIAp9CgoKICAgLy8gaWYoJCgiLmRpc2Vh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