Documentation ¶
Overview ¶
Package web embeds the gobenchdata web application, configuration, and utilities
Index ¶
- Variables
- func DefaultConfigPath(dir string) string
- func GenerateApp(dir string, it TemplateIndexHTML) error
- func GenerateConfig(dir string, defaultConfig Config, override bool) error
- func ListenAndServe(addr string, config Config, it TemplateIndexHTML) error
- func LoadDefaults(dir string, flags Flags) (*Config, *TemplateIndexHTML)
- func ReadFile(path string) ([]byte, error)
- func WalkDirs(name string, includeDirsInList bool, files ...string) ([]string, error)
- func WriteFile(filename string, data []byte, perm os.FileMode) error
- type Chart
- type ChartDisplay
- type ChartGroup
- type Config
- type Flags
- type HTTPFS
- type TemplateIndexHTML
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CTX is a context for webdav vfs CTX = context.Background() // FS is a virtual memory file system FS = webdav.NewMemFS() // Handler is used to server files through a http handler Handler *webdav.Handler // HTTP is the http file system HTTP http.FileSystem = new(HTTPFS) )
View Source
var FileAssetsIndex954c23c5Js = []byte("\x76\x61\x72\x20\x5f\x5f\x64\x65\x66\x50\x72\x6f\x70\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x3b\x0a\x76\x61\x72\x20\x5f\x5f\x64\x65\x66\x4e\x6f\x72\x6d\x61\x6c\x50\x72\x6f\x70\x20\x3d\x20\x28\x6f\x62\x6a\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x6b\x65\x79\x20\x69\x6e\x20\x6f\x62\x6a\x20\x3f\x20\x5f\x5f\x64\x65\x66\x50\x72\x6f\x70\x28\x6f\x62\x6a\x2c\x20\x6b\x65\x79\x2c\x20\x7b\x20\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x20\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x20\x77\x72\x69\x74\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x20\x76\x61\x6c\x75\x65\x20\x7d\x29\x20\x3a\x20\x6f\x62\x6a\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x76\x61\x72\x20\x5f\x5f\x70\x75\x62\x6c\x69\x63\x46\x69\x65\x6c\x64\x20\x3d\x20\x28\x6f\x62\x6a\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x5f\x5f\x64\x65\x66\x4e\x6f\x72\x6d\x61\x6c\x50\x72\x6f\x70\x28\x6f\x62\x6a\x2c\x20\x74\x79\x70\x65\x6f\x66\x20\x6b\x65\x79\x20\x21\x3d\x3d\x20\x22\x73\x79\x6d\x62\x6f\x6c\x22\x20\x3f\x20\x6b\x65\x79\x20\x2b\x20\x22\x22\x20\x3a\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x70\x24\x31\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x6f\x6c\x79\x66\x69\x6c\x6c\x28\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x6c\x4c\x69\x73\x74\x20\x3d\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x28\x22\x6c\x69\x6e\x6b\x22\x29\x2e\x72\x65\x6c\x4c\x69\x73\x74\x3b\x0a\x20\x20\x69\x66\x20\x28\x72\x65\x6c\x4c\x69\x73\x74\x20\x26\x26\x20\x72\x65\x6c\x4c\x69\x73\x74\x2e\x73\x75\x70\x70\x6f\x72\x74\x73\x20\x26\x26\x20\x72\x65\x6c\x4c\x69\x73\x74\x2e\x73\x75\x70\x70\x6f\x72\x74\x73\x28\x22\x6d\x6f\x64\x75\x6c\x65\x70\x72\x65\x6c\x6f\x61\x64\x22\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6c\x69\x6e\x6b\x20\x6f\x66\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72\x41\x6c\x6c\x28\x27\x6c\x69\x6e\x6b\x5b\x72\x65\x6c\x3d\x22\x6d\x6f\x64\x75\x6c\x65\x70\x72\x65\x6c\x6f\x61\x64\x22\x5d\x27\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x70\x72\x6f\x63\x65\x73\x73\x50\x72\x65\x6c\x6f\x61\x64\x28\x6c\x69\x6e\x6b\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6e\x65\x77\x20\x4d\x75\x74\x61\x74\x69\x6f\x6e\x4f\x62\x73\x65\x72\x76\x65\x72\x28\x28\x6d\x75\x74\x61\x74\x69\x6f\x6e\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6d\x75\x74\x61\x74\x69\x6f\x6e\x20\x6f\x66\x20\x6d\x75\x74\x61\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6d\x75\x74\x61\x74\x69\x6f\x6e\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x22\x63\x68\x69\x6c\x64\x4c\x69\x73\x74\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x69\x6e\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x64\x65\x20\x6f\x66\x20\x6d\x75\x74\x61\x74\x69\x6f\x6e\x2e\x61\x64\x64\x65\x64\x4e\x6f\x64\x65\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x6f\x64\x65\x2e\x74\x61\x67\x4e\x61\x6d\x65\x20\x3d\x3d\x3d\x20\x22\x4c\x49\x4e\x4b\x22\x20\x26\x26\x20\x6e\x6f\x64\x65\x2e\x72\x65\x6c\x20\x3d\x3d\x3d\x20\x22\x6d\x6f\x64\x75\x6c\x65\x70\x72\x65\x6c\x6f\x61\x64\x22\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x63\x65\x73\x73\x50\x72\x65\x6c\x6f\x61\x64\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x29\x2e\x6f\x62\x73\x65\x72\x76\x65\x28\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2c\x20\x7b\x20\x63\x68\x69\x6c\x64\x4c\x69\x73\x74\x3a\x20\x74\x72\x75\x65\x2c\x20\x73\x75\x62\x74\x72\x65\x65\x3a\x20\x74\x72\x75\x65\x20\x7d\x29\x3b\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x46\x65\x74\x63\x68\x4f\x70\x74\x73\x28\x73\x63\x72\x69\x70\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x65\x74\x63\x68\x4f\x70\x74\x73\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x63\x72\x69\x70\x74\x2e\x69\x6e\x74\x65\x67\x72\x69\x74\x79\x29\x0a\x20\x20\x20\x20\x20\x20\x66\x65\x74\x63\x68\x4f\x70\x74\x73\x2e\x69\x6e\x74\x65\x67\x72\x69\x74\x79\x20\x3d\x20\x73\x63\x72\x69\x70\x74\x2e\x69\x6e\x74\x65\x67\x72\x69\x74\x79\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x63\x72\x69\x70\x74\x2e\x72\x65\x66\x65\x72\x72\x65\x72\x70\x6f\x6c\x69\x63\x79\x29\x0a\x20\x20\x20\x20\x20\x20\x66\x65\x74\x63\x68\x4f\x70\x74\x73\x2e\x72\x65\x66\x65\x72\x72\x65\x72\x50\x6f\x6c\x69\x63\x79\x20\x3d\x20\x73\x63\x72\x69\x70\x74\x2e\x72\x65\x66\x65\x72\x72\x65\x72\x70\x6f\x6c\x69\x63\x79\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x63\x72\x69\x70\x74\x2e\x63\x72\x6f\x73\x73\x6f\x72\x69\x67\x69\x6e\x20\x3d\x3d\x3d\x20\x22\x75\x73\x65\x2d\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73\x22\x29\x0a\x20\x20\x20\x20\x20\x20\x66\x65\x74\x63\x68\x4f\x70\x74\x73\x2e\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73\x20\x3d\x20\x22\x69\x6e\x63\x6c\x75\x64\x65\x22\x3b\x0a\x20\x20\x20\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x63\x72\x69\x70\x74\x2e\x63\x72\x6f\x73\x73\x6f\x72\x69\x67\x69\x6e\x20\x3d\x3d\x3d\x20\x22\x61\x6e\x6f\x6e\x79\x6d\x6f\x75\x73\x22\x29\x0a\x20\x20\x20\x20\x20\x20\x66\x65\x74\x63\x68\x4f\x70\x74\x73\x2e\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73\x20\x3d\x20\x22\x6f\x6d\x69\x74\x22\x3b\x0a\x20\x20\x20\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x20\x20\x66\x65\x74\x63\x68\x4f\x70\x74\x73\x2e\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73\x20\x3d\x20\x22\x73\x61\x6d\x65\x2d\x6f\x72\x69\x67\x69\x6e\x22\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x65\x74\x63\x68\x4f\x70\x74\x73\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x72\x6f\x63\x65\x73\x73\x50\x72\x65\x6c\x6f\x61\x64\x28\x6c\x69\x6e\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6c\x69\x6e\x6b\x2e\x65\x70\x29\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x6c\x69\x6e\x6b\x2e\x65\x70\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x65\x74\x63\x68\x4f\x70\x74\x73\x20\x3d\x20\x67\x65\x74\x46\x65\x74\x63\x68\x4f\x70\x74\x73\x28\x6c\x69\x6e\x6b\x29\x3b\x0a\x20\x20\x20\x20\x66\x65\x74\x63\x68\x28\x6c\x69\x6e\x6b\x2e\x68\x72\x65\x66\x2c\x20\x66\x65\x74\x63\x68\x4f\x70\x74\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x70\x24\x31\x28\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x61\x6b\x65\x4d\x61\x70\x28\x73\x74\x72\x2c\x20\x65\x78\x70\x65\x63\x74\x73\x4c\x6f\x77\x65\x72\x43\x61\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x61\x70\x32\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x69\x73\x74\x20\x3d\x20\x73\x74\x72\x2e\x73\x70\x6c\x69\x74\x28\x22\x2c\x22\x29\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x6c\x69\x73\x74\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x6d\x61\x70\x32\x5b\x6c\x69\x73\x74\x5b\x69\x5d\x5d\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x78\x70\x65\x63\x74\x73\x4c\x6f\x77\x65\x72\x43\x61\x73\x65\x20\x3f\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x21\x21\x6d\x61\x70\x32\x5b\x76\x61\x6c\x2e\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65\x28\x29\x5d\x20\x3a\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x21\x21\x6d\x61\x70\x32\x5b\x76\x61\x6c\x5d\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x47\x4c\x4f\x42\x41\x4c\x53\x5f\x57\x48\x49\x54\x45\x5f\x4c\x49\x53\x54\x45\x44\x20\x3d\x20\x22\x49\x6e\x66\x69\x6e\x69\x74\x79\x2c\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x2c\x4e\x61\x4e\x2c\x69\x73\x46\x69\x6e\x69\x74\x65\x2c\x69\x73\x4e\x61\x4e\x2c\x70\x61\x72\x73\x65\x46\x6c\x6f\x61\x74\x2c\x70\x61\x72\x73\x65\x49\x6e\x74\x2c\x64\x65\x63\x6f\x64\x65\x55\x52\x49\x2c\x64\x65\x63\x6f\x64\x65\x55\x52\x49\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x65\x6e\x63\x6f\x64\x65\x55\x52\x49\x2c\x65\x6e\x63\x6f\x64\x65\x55\x52\x49\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x4d\x61\x74\x68\x2c\x4e\x75\x6d\x62\x65\x72\x2c\x44\x61\x74\x65\x2c\x41\x72\x72\x61\x79\x2c\x4f\x62\x6a\x65\x63\x74\x2c\x42\x6f\x6f\x6c\x65\x61\x6e\x2c\x53\x74\x72\x69\x6e\x67\x2c\x52\x65\x67\x45\x78\x70\x2c\x4d\x61\x70\x2c\x53\x65\x74\x2c\x4a\x53\x4f\x4e\x2c\x49\x6e\x74\x6c\x2c\x42\x69\x67\x49\x6e\x74\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x47\x6c\x6f\x62\x61\x6c\x6c\x79\x57\x68\x69\x74\x65\x6c\x69\x73\x74\x65\x64\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6d\x61\x6b\x65\x4d\x61\x70\x28\x47\x4c\x4f\x42\x41\x4c\x53\x5f\x57\x48\x49\x54\x45\x5f\x4c\x49\x53\x54\x45\x44\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x70\x65\x63\x69\x61\x6c\x42\x6f\x6f\x6c\x65\x61\x6e\x41\x74\x74\x72\x73\x20\x3d\x20\x60\x69\x74\x65\x6d\x73\x63\x6f\x70\x65\x2c\x61\x6c\x6c\x6f\x77\x66\x75\x6c\x6c\x73\x63\x72\x65\x65\x6e\x2c\x66\x6f\x72\x6d\x6e\x6f\x76\x61\x6c\x69\x64\x61\x74\x65\x2c\x69\x73\x6d\x61\x70\x2c\x6e\x6f\x6d\x6f\x64\x75\x6c\x65\x2c\x6e\x6f\x76\x61\x6c\x69\x64\x61\x74\x65\x2c\x72\x65\x61\x64\x6f\x6e\x6c\x79\x60\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x53\x70\x65\x63\x69\x61\x6c\x42\x6f\x6f\x6c\x65\x61\x6e\x41\x74\x74\x72\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6d\x61\x6b\x65\x4d\x61\x70\x28\x73\x70\x65\x63\x69\x61\x6c\x42\x6f\x6f\x6c\x65\x61\x6e\x41\x74\x74\x72\x73\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x63\x6c\x75\x64\x65\x42\x6f\x6f\x6c\x65\x61\x6e\x41\x74\x74\x72\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x21\x76\x61\x6c\x75\x65\x20\x7c\x7c\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x3d\x20\x22\x22\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x74\x79\x6c\x65\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x76\x61\x6c\x75\x65\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x74\x65\x6d\x20\x3d\x20\x76\x61\x6c\x75\x65\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x20\x3d\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x69\x74\x65\x6d\x29\x20\x3f\x20\x70\x61\x72\x73\x65\x53\x74\x72\x69\x6e\x67\x53\x74\x79\x6c\x65\x28\x69\x74\x65\x6d\x29\x20\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x74\x79\x6c\x65\x28\x69\x74\x65\x6d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x6c\x69\x73\x74\x44\x65\x6c\x69\x6d\x69\x74\x65\x72\x52\x45\x20\x3d\x20\x2f\x3b\x28\x3f\x21\x5b\x5e\x28\x5d\x2a\x5c\x29\x29\x2f\x67\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x70\x65\x72\x74\x79\x44\x65\x6c\x69\x6d\x69\x74\x65\x72\x52\x45\x20\x3d\x20\x2f\x3a\x28\x2e\x2b\x29\x2f\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x61\x72\x73\x65\x53\x74\x72\x69\x6e\x67\x53\x74\x79\x6c\x65\x28\x63\x73\x73\x54\x65\x78\x74\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x74\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x63\x73\x73\x54\x65\x78\x74\x2e\x73\x70\x6c\x69\x74\x28\x6c\x69\x73\x74\x44\x65\x6c\x69\x6d\x69\x74\x65\x72\x52\x45\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x69\x74\x65\x6d\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x74\x65\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x6d\x70\x20\x3d\x20\x69\x74\x65\x6d\x2e\x73\x70\x6c\x69\x74\x28\x70\x72\x6f\x70\x65\x72\x74\x79\x44\x65\x6c\x69\x6d\x69\x74\x65\x72\x52\x45\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x6d\x70\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x31\x20\x26\x26\x20\x28\x72\x65\x74\x5b\x74\x6d\x70\x5b\x30\x5d\x2e\x74\x72\x69\x6d\x28\x29\x5d\x20\x3d\x20\x74\x6d\x70\x5b\x31\x5d\x2e\x74\x72\x69\x6d\x28\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x6c\x61\x73\x73\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x72\x65\x73\x20\x3d\x20\x22\x22\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x73\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x76\x61\x6c\x75\x65\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x6c\x61\x73\x73\x28\x76\x61\x6c\x75\x65\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x73\x20\x2b\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x20\x2b\x20\x22\x20\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6e\x61\x6d\x65\x20\x69\x6e\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x5b\x6e\x61\x6d\x65\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x73\x20\x2b\x3d\x20\x6e\x61\x6d\x65\x20\x2b\x20\x22\x20\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x2e\x74\x72\x69\x6d\x28\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x50\x72\x6f\x70\x73\x28\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x70\x72\x6f\x70\x73\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x6c\x65\x74\x20\x7b\x20\x63\x6c\x61\x73\x73\x3a\x20\x6b\x6c\x61\x73\x73\x2c\x20\x73\x74\x79\x6c\x65\x20\x7d\x20\x3d\x20\x70\x72\x6f\x70\x73\x3b\x0a\x20\x20\x69\x66\x20\x28\x6b\x6c\x61\x73\x73\x20\x26\x26\x20\x21\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x6b\x6c\x61\x73\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x2e\x63\x6c\x61\x73\x73\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x6c\x61\x73\x73\x28\x6b\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x73\x74\x79\x6c\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x2e\x73\x74\x79\x6c\x65\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x74\x79\x6c\x65\x28\x73\x74\x79\x6c\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x6f\x70\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6c\x6f\x6f\x73\x65\x43\x6f\x6d\x70\x61\x72\x65\x41\x72\x72\x61\x79\x73\x28\x61\x2c\x20\x62\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x61\x2e\x6c\x65\x6e\x67\x74\x68\x20\x21\x3d\x3d\x20\x62\x2e\x6c\x65\x6e\x67\x74\x68\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x65\x71\x75\x61\x6c\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x65\x71\x75\x61\x6c\x20\x26\x26\x20\x69\x20\x3c\x20\x61\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x71\x75\x61\x6c\x20\x3d\x20\x6c\x6f\x6f\x73\x65\x45\x71\x75\x61\x6c\x28\x61\x5b\x69\x5d\x2c\x20\x62\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x71\x75\x61\x6c\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6c\x6f\x6f\x73\x65\x45\x71\x75\x61\x6c\x28\x61\x2c\x20\x62\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x61\x20\x3d\x3d\x3d\x20\x62\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x3d\x20\x69\x73\x44\x61\x74\x65\x28\x61\x29\x3b\x0a\x20\x20\x6c\x65\x74\x20\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x3d\x20\x69\x73\x44\x61\x74\x65\x28\x62\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x7c\x7c\x20\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x26\x26\x20\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x3f\x20\x61\x2e\x67\x65\x74\x54\x69\x6d\x65\x28\x29\x20\x3d\x3d\x3d\x20\x62\x2e\x67\x65\x74\x54\x69\x6d\x65\x28\x29\x20\x3a\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x3d\x20\x69\x73\x53\x79\x6d\x62\x6f\x6c\x28\x61\x29\x3b\x0a\x20\x20\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x3d\x20\x69\x73\x53\x79\x6d\x62\x6f\x6c\x28\x62\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x7c\x7c\x20\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x20\x3d\x3d\x3d\x20\x62\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x3d\x20\x69\x73\x41\x72\x72\x61\x79\x28\x61\x29\x3b\x0a\x20\x20\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x3d\x20\x69\x73\x41\x72\x72\x61\x79\x28\x62\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x7c\x7c\x20\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x26\x26\x20\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x3f\x20\x6c\x6f\x6f\x73\x65\x43\x6f\x6d\x70\x61\x72\x65\x41\x72\x72\x61\x79\x73\x28\x61\x2c\x20\x62\x29\x20\x3a\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x3d\x20\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x61\x29\x3b\x0a\x20\x20\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x3d\x20\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x62\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x7c\x7c\x20\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x61\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x20\x7c\x7c\x20\x21\x62\x56\x61\x6c\x69\x64\x54\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x4b\x65\x79\x73\x43\x6f\x75\x6e\x74\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x61\x29\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x62\x4b\x65\x79\x73\x43\x6f\x75\x6e\x74\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x62\x29\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x61\x4b\x65\x79\x73\x43\x6f\x75\x6e\x74\x20\x21\x3d\x3d\x20\x62\x4b\x65\x79\x73\x43\x6f\x75\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x61\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x48\x61\x73\x4b\x65\x79\x20\x3d\x20\x61\x2e\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x62\x48\x61\x73\x4b\x65\x79\x20\x3d\x20\x62\x2e\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x61\x48\x61\x73\x4b\x65\x79\x20\x26\x26\x20\x21\x62\x48\x61\x73\x4b\x65\x79\x20\x7c\x7c\x20\x21\x61\x48\x61\x73\x4b\x65\x79\x20\x26\x26\x20\x62\x48\x61\x73\x4b\x65\x79\x20\x7c\x7c\x20\x21\x6c\x6f\x6f\x73\x65\x45\x71\x75\x61\x6c\x28\x61\x5b\x6b\x65\x79\x5d\x2c\x20\x62\x5b\x6b\x65\x79\x5d\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x53\x74\x72\x69\x6e\x67\x28\x61\x29\x20\x3d\x3d\x3d\x20\x53\x74\x72\x69\x6e\x67\x28\x62\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6c\x6f\x6f\x73\x65\x49\x6e\x64\x65\x78\x4f\x66\x28\x61\x72\x72\x2c\x20\x76\x61\x6c\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x72\x72\x2e\x66\x69\x6e\x64\x49\x6e\x64\x65\x78\x28\x28\x69\x74\x65\x6d\x29\x20\x3d\x3e\x20\x6c\x6f\x6f\x73\x65\x45\x71\x75\x61\x6c\x28\x69\x74\x65\x6d\x2c\x20\x76\x61\x6c\x29\x29\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x74\x6f\x44\x69\x73\x70\x6c\x61\x79\x53\x74\x72\x69\x6e\x67\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x29\x20\x3f\x20\x76\x61\x6c\x20\x3a\x20\x76\x61\x6c\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x22\x22\x20\x3a\x20\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x29\x20\x7c\x7c\x20\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x76\x61\x6c\x29\x20\x26\x26\x20\x28\x76\x61\x6c\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x20\x3d\x3d\x3d\x20\x6f\x62\x6a\x65\x63\x74\x54\x6f\x53\x74\x72\x69\x6e\x67\x20\x7c\x7c\x20\x21\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x76\x61\x6c\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x29\x29\x20\x3f\x20\x4a\x53\x4f\x4e\x2e\x73\x74\x72\x69\x6e\x67\x69\x66\x79\x28\x76\x61\x6c\x2c\x20\x72\x65\x70\x6c\x61\x63\x65\x72\x2c\x20\x32\x29\x20\x3a\x20\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x29\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x70\x6c\x61\x63\x65\x72\x20\x3d\x20\x28\x5f\x6b\x65\x79\x2c\x20\x76\x61\x6c\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x20\x26\x26\x20\x76\x61\x6c\x2e\x5f\x5f\x76\x5f\x69\x73\x52\x65\x66\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x70\x6c\x61\x63\x65\x72\x28\x5f\x6b\x65\x79\x2c\x20\x76\x61\x6c\x2e\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x4d\x61\x70\x24\x31\x28\x76\x61\x6c\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x5b\x60\x4d\x61\x70\x28\x24\x7b\x76\x61\x6c\x2e\x73\x69\x7a\x65\x7d\x29\x60\x5d\x3a\x20\x5b\x2e\x2e\x2e\x76\x61\x6c\x2e\x65\x6e\x74\x72\x69\x65\x73\x28\x29\x5d\x2e\x72\x65\x64\x75\x63\x65\x28\x28\x65\x6e\x74\x72\x69\x65\x73\x2c\x20\x5b\x6b\x65\x79\x2c\x20\x76\x61\x6c\x32\x5d\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6e\x74\x72\x69\x65\x73\x5b\x60\x24\x7b\x6b\x65\x79\x7d\x20\x3d\x3e\x60\x5d\x20\x3d\x20\x76\x61\x6c\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x6e\x74\x72\x69\x65\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x7b\x7d\x29\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x53\x65\x74\x28\x76\x61\x6c\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x5b\x60\x53\x65\x74\x28\x24\x7b\x76\x61\x6c\x2e\x73\x69\x7a\x65\x7d\x29\x60\x5d\x3a\x20\x5b\x2e\x2e\x2e\x76\x61\x6c\x2e\x76\x61\x6c\x75\x65\x73\x28\x29\x5d\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x76\x61\x6c\x29\x20\x26\x26\x20\x21\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x29\x20\x26\x26\x20\x21\x69\x73\x50\x6c\x61\x69\x6e\x4f\x62\x6a\x65\x63\x74\x28\x76\x61\x6c\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x20\x3d\x20\x7b\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x45\x4d\x50\x54\x59\x5f\x41\x52\x52\x20\x3d\x20\x5b\x5d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x4e\x4f\x4f\x50\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x4e\x4f\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x52\x45\x20\x3d\x20\x2f\x5e\x6f\x6e\x5b\x5e\x61\x2d\x7a\x5d\x2f\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x4f\x6e\x20\x3d\x20\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x6f\x6e\x52\x45\x2e\x74\x65\x73\x74\x28\x6b\x65\x79\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x4d\x6f\x64\x65\x6c\x4c\x69\x73\x74\x65\x6e\x65\x72\x20\x3d\x20\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x6b\x65\x79\x2e\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68\x28\x22\x6f\x6e\x55\x70\x64\x61\x74\x65\x3a\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x65\x78\x74\x65\x6e\x64\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x61\x73\x73\x69\x67\x6e\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x6d\x6f\x76\x65\x20\x3d\x20\x28\x61\x72\x72\x2c\x20\x65\x6c\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x20\x3d\x20\x61\x72\x72\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x65\x6c\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x20\x3e\x20\x2d\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x61\x72\x72\x2e\x73\x70\x6c\x69\x63\x65\x28\x69\x2c\x20\x31\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x2e\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x68\x61\x73\x4f\x77\x6e\x20\x3d\x20\x28\x76\x61\x6c\x2c\x20\x6b\x65\x79\x29\x20\x3d\x3e\x20\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x2e\x63\x61\x6c\x6c\x28\x76\x61\x6c\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x41\x72\x72\x61\x79\x20\x3d\x20\x41\x72\x72\x61\x79\x2e\x69\x73\x41\x72\x72\x61\x79\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x4d\x61\x70\x24\x31\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x74\x6f\x54\x79\x70\x65\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x29\x20\x3d\x3d\x3d\x20\x22\x5b\x6f\x62\x6a\x65\x63\x74\x20\x4d\x61\x70\x5d\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x53\x65\x74\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x74\x6f\x54\x79\x70\x65\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x29\x20\x3d\x3d\x3d\x20\x22\x5b\x6f\x62\x6a\x65\x63\x74\x20\x53\x65\x74\x5d\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x44\x61\x74\x65\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x74\x6f\x54\x79\x70\x65\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x29\x20\x3d\x3d\x3d\x20\x22\x5b\x6f\x62\x6a\x65\x63\x74\x20\x44\x61\x74\x65\x5d\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x74\x79\x70\x65\x6f\x66\x20\x76\x61\x6c\x20\x3d\x3d\x3d\x20\x22\x66\x75\x6e\x63\x74\x69\x6f\x6e\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x74\x79\x70\x65\x6f\x66\x20\x76\x61\x6c\x20\x3d\x3d\x3d\x20\x22\x73\x74\x72\x69\x6e\x67\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x53\x79\x6d\x62\x6f\x6c\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x74\x79\x70\x65\x6f\x66\x20\x76\x61\x6c\x20\x3d\x3d\x3d\x20\x22\x73\x79\x6d\x62\x6f\x6c\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x4f\x62\x6a\x65\x63\x74\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x76\x61\x6c\x20\x21\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x26\x26\x20\x74\x79\x70\x65\x6f\x66\x20\x76\x61\x6c\x20\x3d\x3d\x3d\x20\x22\x6f\x62\x6a\x65\x63\x74\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x50\x72\x6f\x6d\x69\x73\x65\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x76\x61\x6c\x29\x20\x26\x26\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x76\x61\x6c\x2e\x74\x68\x65\x6e\x29\x20\x26\x26\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x76\x61\x6c\x2e\x63\x61\x74\x63\x68\x29\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x62\x6a\x65\x63\x74\x54\x6f\x53\x74\x72\x69\x6e\x67\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x74\x6f\x54\x79\x70\x65\x53\x74\x72\x69\x6e\x67\x20\x3d\x20\x28\x76\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x6f\x62\x6a\x65\x63\x74\x54\x6f\x53\x74\x72\x69\x6e\x67\x2e\x63\x61\x6c\x6c\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x74\x6f\x52\x61\x77\x54\x79\x70\x65\x20\x3d\x20\x28\x76\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x6f\x54\x79\x70\x65\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x75\x65\x29\x2e\x73\x6c\x69\x63\x65\x28\x38\x2c\x20\x2d\x31\x29\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x50\x6c\x61\x69\x6e\x4f\x62\x6a\x65\x63\x74\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x74\x6f\x54\x79\x70\x65\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x29\x20\x3d\x3d\x3d\x20\x22\x5b\x6f\x62\x6a\x65\x63\x74\x20\x4f\x62\x6a\x65\x63\x74\x5d\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x49\x6e\x74\x65\x67\x65\x72\x4b\x65\x79\x20\x3d\x20\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x6b\x65\x79\x29\x20\x26\x26\x20\x6b\x65\x79\x20\x21\x3d\x3d\x20\x22\x4e\x61\x4e\x22\x20\x26\x26\x20\x6b\x65\x79\x5b\x30\x5d\x20\x21\x3d\x3d\x20\x22\x2d\x22\x20\x26\x26\x20\x22\x22\x20\x2b\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x6b\x65\x79\x2c\x20\x31\x30\x29\x20\x3d\x3d\x3d\x20\x6b\x65\x79\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x52\x65\x73\x65\x72\x76\x65\x64\x50\x72\x6f\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6d\x61\x6b\x65\x4d\x61\x70\x28\x22\x2c\x6b\x65\x79\x2c\x72\x65\x66\x2c\x72\x65\x66\x5f\x66\x6f\x72\x2c\x72\x65\x66\x5f\x6b\x65\x79\x2c\x6f\x6e\x56\x6e\x6f\x64\x65\x42\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x2c\x6f\x6e\x56\x6e\x6f\x64\x65\x4d\x6f\x75\x6e\x74\x65\x64\x2c\x6f\x6e\x56\x6e\x6f\x64\x65\x42\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x2c\x6f\x6e\x56\x6e\x6f\x64\x65\x55\x70\x64\x61\x74\x65\x64\x2c\x6f\x6e\x56\x6e\x6f\x64\x65\x42\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x2c\x6f\x6e\x56\x6e\x6f\x64\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x53\x74\x72\x69\x6e\x67\x46\x75\x6e\x63\x74\x69\x6f\x6e\x20\x3d\x20\x28\x66\x6e\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x73\x74\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x69\x74\x20\x3d\x20\x63\x61\x63\x68\x65\x5b\x73\x74\x72\x5d\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x69\x74\x20\x7c\x7c\x20\x28\x63\x61\x63\x68\x65\x5b\x73\x74\x72\x5d\x20\x3d\x20\x66\x6e\x28\x73\x74\x72\x29\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x52\x45\x20\x3d\x20\x2f\x2d\x28\x5c\x77\x29\x2f\x67\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x20\x3d\x20\x63\x61\x63\x68\x65\x53\x74\x72\x69\x6e\x67\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x28\x73\x74\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x74\x72\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x63\x61\x6d\x65\x6c\x69\x7a\x65\x52\x45\x2c\x20\x28\x5f\x2c\x20\x63\x29\x20\x3d\x3e\x20\x63\x20\x3f\x20\x63\x2e\x74\x6f\x55\x70\x70\x65\x72\x43\x61\x73\x65\x28\x29\x20\x3a\x20\x22\x22\x29\x3b\x0a\x7d\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x52\x45\x20\x3d\x20\x2f\x5c\x42\x28\x5b\x41\x2d\x5a\x5d\x29\x2f\x67\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x20\x3d\x20\x63\x61\x63\x68\x65\x53\x74\x72\x69\x6e\x67\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x28\x73\x74\x72\x29\x20\x3d\x3e\x20\x73\x74\x72\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x52\x45\x2c\x20\x22\x2d\x24\x31\x22\x29\x2e\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65\x28\x29\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x63\x61\x70\x69\x74\x61\x6c\x69\x7a\x65\x20\x3d\x20\x63\x61\x63\x68\x65\x53\x74\x72\x69\x6e\x67\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x28\x73\x74\x72\x29\x20\x3d\x3e\x20\x73\x74\x72\x2e\x63\x68\x61\x72\x41\x74\x28\x30\x29\x2e\x74\x6f\x55\x70\x70\x65\x72\x43\x61\x73\x65\x28\x29\x20\x2b\x20\x73\x74\x72\x2e\x73\x6c\x69\x63\x65\x28\x31\x29\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x74\x6f\x48\x61\x6e\x64\x6c\x65\x72\x4b\x65\x79\x20\x3d\x20\x63\x61\x63\x68\x65\x53\x74\x72\x69\x6e\x67\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x28\x73\x74\x72\x29\x20\x3d\x3e\x20\x73\x74\x72\x20\x3f\x20\x60\x6f\x6e\x24\x7b\x63\x61\x70\x69\x74\x61\x6c\x69\x7a\x65\x28\x73\x74\x72\x29\x7d\x60\x20\x3a\x20\x60\x60\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x68\x61\x73\x43\x68\x61\x6e\x67\x65\x64\x20\x3d\x20\x28\x76\x61\x6c\x75\x65\x2c\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x21\x4f\x62\x6a\x65\x63\x74\x2e\x69\x73\x28\x76\x61\x6c\x75\x65\x2c\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x6e\x76\x6f\x6b\x65\x41\x72\x72\x61\x79\x46\x6e\x73\x20\x3d\x20\x28\x66\x6e\x73\x2c\x20\x61\x72\x67\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x66\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6e\x73\x5b\x69\x5d\x28\x61\x72\x67\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x64\x65\x66\x20\x3d\x20\x28\x6f\x62\x6a\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x6f\x62\x6a\x2c\x20\x6b\x65\x79\x2c\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65\x3a\x20\x66\x61\x6c\x73\x65\x2c\x0a\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x0a\x20\x20\x7d\x29\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x74\x6f\x4e\x75\x6d\x62\x65\x72\x20\x3d\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x20\x3d\x20\x70\x61\x72\x73\x65\x46\x6c\x6f\x61\x74\x28\x76\x61\x6c\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x4e\x61\x4e\x28\x6e\x29\x20\x3f\x20\x76\x61\x6c\x20\x3a\x20\x6e\x3b\x0a\x7d\x3b\x0a\x6c\x65\x74\x20\x5f\x67\x6c\x6f\x62\x61\x6c\x54\x68\x69\x73\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x47\x6c\x6f\x62\x61\x6c\x54\x68\x69\x73\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5f\x67\x6c\x6f\x62\x61\x6c\x54\x68\x69\x73\x20\x7c\x7c\x20\x28\x5f\x67\x6c\x6f\x62\x61\x6c\x54\x68\x69\x73\x20\x3d\x20\x74\x79\x70\x65\x6f\x66\x20\x67\x6c\x6f\x62\x61\x6c\x54\x68\x69\x73\x20\x21\x3d\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x3f\x20\x67\x6c\x6f\x62\x61\x6c\x54\x68\x69\x73\x20\x3a\x20\x74\x79\x70\x65\x6f\x66\x20\x73\x65\x6c\x66\x20\x21\x3d\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x3f\x20\x73\x65\x6c\x66\x20\x3a\x20\x74\x79\x70\x65\x6f\x66\x20\x77\x69\x6e\x64\x6f\x77\x20\x21\x3d\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x3f\x20\x77\x69\x6e\x64\x6f\x77\x20\x3a\x20\x74\x79\x70\x65\x6f\x66\x20\x67\x6c\x6f\x62\x61\x6c\x20\x21\x3d\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x3f\x20\x67\x6c\x6f\x62\x61\x6c\x20\x3a\x20\x7b\x7d\x29\x3b\x0a\x7d\x3b\x0a\x6c\x65\x74\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x3b\x0a\x63\x6c\x61\x73\x73\x20\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x64\x65\x74\x61\x63\x68\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x61\x63\x74\x69\x76\x65\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x65\x66\x66\x65\x63\x74\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x63\x6c\x65\x61\x6e\x75\x70\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x64\x65\x74\x61\x63\x68\x65\x64\x20\x26\x26\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x69\x6e\x64\x65\x78\x20\x3d\x20\x28\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x2e\x73\x63\x6f\x70\x65\x73\x20\x7c\x7c\x20\x28\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x2e\x73\x63\x6f\x70\x65\x73\x20\x3d\x20\x5b\x5d\x29\x29\x2e\x70\x75\x73\x68\x28\x74\x68\x69\x73\x29\x20\x2d\x20\x31\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x75\x6e\x28\x66\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x68\x69\x73\x2e\x61\x63\x74\x69\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x20\x3d\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x79\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x20\x3d\x20\x74\x68\x69\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x6e\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x66\x69\x6e\x61\x6c\x6c\x79\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x20\x3d\x20\x74\x68\x69\x73\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6f\x66\x66\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x20\x3d\x20\x74\x68\x69\x73\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x73\x74\x6f\x70\x28\x66\x72\x6f\x6d\x50\x61\x72\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x68\x69\x73\x2e\x61\x63\x74\x69\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x69\x2c\x20\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x69\x20\x3d\x20\x30\x2c\x20\x6c\x20\x3d\x20\x74\x68\x69\x73\x2e\x65\x66\x66\x65\x63\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x20\x3c\x20\x6c\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x65\x66\x66\x65\x63\x74\x73\x5b\x69\x5d\x2e\x73\x74\x6f\x70\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x69\x20\x3d\x20\x30\x2c\x20\x6c\x20\x3d\x20\x74\x68\x69\x73\x2e\x63\x6c\x65\x61\x6e\x75\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x20\x3c\x20\x6c\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x63\x6c\x65\x61\x6e\x75\x70\x73\x5b\x69\x5d\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x68\x69\x73\x2e\x73\x63\x6f\x70\x65\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x69\x20\x3d\x20\x30\x2c\x20\x6c\x20\x3d\x20\x74\x68\x69\x73\x2e\x73\x63\x6f\x70\x65\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x20\x3c\x20\x6c\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x73\x63\x6f\x70\x65\x73\x5b\x69\x5d\x2e\x73\x74\x6f\x70\x28\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x68\x69\x73\x2e\x70\x61\x72\x65\x6e\x74\x20\x26\x26\x20\x21\x66\x72\x6f\x6d\x50\x61\x72\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x61\x73\x74\x20\x3d\x20\x74\x68\x69\x73\x2e\x70\x61\x72\x65\x6e\x74\x2e\x73\x63\x6f\x70\x65\x73\x2e\x70\x6f\x70\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6c\x61\x73\x74\x20\x26\x26\x20\x6c\x61\x73\x74\x20\x21\x3d\x3d\x20\x74\x68\x69\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x70\x61\x72\x65\x6e\x74\x2e\x73\x63\x6f\x70\x65\x73\x5b\x74\x68\x69\x73\x2e\x69\x6e\x64\x65\x78\x5d\x20\x3d\x20\x6c\x61\x73\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x61\x73\x74\x2e\x69\x6e\x64\x65\x78\x20\x3d\x20\x74\x68\x69\x73\x2e\x69\x6e\x64\x65\x78\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x61\x63\x74\x69\x76\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x65\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x28\x64\x65\x74\x61\x63\x68\x65\x64\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x77\x20\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x28\x64\x65\x74\x61\x63\x68\x65\x64\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x63\x6f\x72\x64\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x28\x65\x66\x66\x65\x63\x74\x32\x2c\x20\x73\x63\x6f\x70\x65\x20\x3d\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x73\x63\x6f\x70\x65\x20\x26\x26\x20\x73\x63\x6f\x70\x65\x2e\x61\x63\x74\x69\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x63\x6f\x70\x65\x2e\x65\x66\x66\x65\x63\x74\x73\x2e\x70\x75\x73\x68\x28\x65\x66\x66\x65\x63\x74\x32\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x53\x63\x6f\x70\x65\x28\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6f\x6e\x53\x63\x6f\x70\x65\x44\x69\x73\x70\x6f\x73\x65\x28\x66\x6e\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x2e\x63\x6c\x65\x61\x6e\x75\x70\x73\x2e\x70\x75\x73\x68\x28\x66\x6e\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x63\x72\x65\x61\x74\x65\x44\x65\x70\x20\x3d\x20\x28\x65\x66\x66\x65\x63\x74\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x65\x70\x20\x3d\x20\x6e\x65\x77\x20\x53\x65\x74\x28\x65\x66\x66\x65\x63\x74\x73\x29\x3b\x0a\x20\x20\x64\x65\x70\x2e\x77\x20\x3d\x20\x30\x3b\x0a\x20\x20\x64\x65\x70\x2e\x6e\x20\x3d\x20\x30\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x65\x70\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x77\x61\x73\x54\x72\x61\x63\x6b\x65\x64\x20\x3d\x20\x28\x64\x65\x70\x29\x20\x3d\x3e\x20\x28\x64\x65\x70\x2e\x77\x20\x26\x20\x74\x72\x61\x63\x6b\x4f\x70\x42\x69\x74\x29\x20\x3e\x20\x30\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x54\x72\x61\x63\x6b\x65\x64\x20\x3d\x20\x28\x64\x65\x70\x29\x20\x3d\x3e\x20\x28\x64\x65\x70\x2e\x6e\x20\x26\x20\x74\x72\x61\x63\x6b\x4f\x70\x42\x69\x74\x29\x20\x3e\x20\x30\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x6e\x69\x74\x44\x65\x70\x4d\x61\x72\x6b\x65\x72\x73\x20\x3d\x20\x28\x7b\x20\x64\x65\x70\x73\x20\x7d\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x64\x65\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x64\x65\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x5b\x69\x5d\x2e\x77\x20\x7c\x3d\x20\x74\x72\x61\x63\x6b\x4f\x70\x42\x69\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x66\x69\x6e\x61\x6c\x69\x7a\x65\x44\x65\x70\x4d\x61\x72\x6b\x65\x72\x73\x20\x3d\x20\x28\x65\x66\x66\x65\x63\x74\x32\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x64\x65\x70\x73\x20\x7d\x20\x3d\x20\x65\x66\x66\x65\x63\x74\x32\x3b\x0a\x20\x20\x69\x66\x20\x28\x64\x65\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x70\x74\x72\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x64\x65\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x65\x70\x20\x3d\x20\x64\x65\x70\x73\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x77\x61\x73\x54\x72\x61\x63\x6b\x65\x64\x28\x64\x65\x70\x29\x20\x26\x26\x20\x21\x6e\x65\x77\x54\x72\x61\x63\x6b\x65\x64\x28\x64\x65\x70\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x70\x2e\x64\x65\x6c\x65\x74\x65\x28\x65\x66\x66\x65\x63\x74\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x5b\x70\x74\x72\x2b\x2b\x5d\x20\x3d\x20\x64\x65\x70\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x64\x65\x70\x2e\x77\x20\x26\x3d\x20\x7e\x74\x72\x61\x63\x6b\x4f\x70\x42\x69\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x64\x65\x70\x2e\x6e\x20\x26\x3d\x20\x7e\x74\x72\x61\x63\x6b\x4f\x70\x42\x69\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x64\x65\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x70\x74\x72\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x4d\x61\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x57\x65\x61\x6b\x4d\x61\x70\x28\x29\x3b\x0a\x6c\x65\x74\x20\x65\x66\x66\x65\x63\x74\x54\x72\x61\x63\x6b\x44\x65\x70\x74\x68\x20\x3d\x20\x30\x3b\x0a\x6c\x65\x74\x20\x74\x72\x61\x63\x6b\x4f\x70\x42\x69\x74\x20\x3d\x20\x31\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6d\x61\x78\x4d\x61\x72\x6b\x65\x72\x42\x69\x74\x73\x20\x3d\x20\x33\x30\x3b\x0a\x6c\x65\x74\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x20\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x28\x22\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x4d\x41\x50\x5f\x4b\x45\x59\x5f\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x20\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x28\x22\x22\x29\x3b\x0a\x63\x6c\x61\x73\x73\x20\x52\x65\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x66\x6e\x2c\x20\x73\x63\x68\x65\x64\x75\x6c\x65\x72\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x73\x63\x6f\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x66\x6e\x20\x3d\x20\x66\x6e\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x73\x63\x68\x65\x64\x75\x6c\x65\x72\x20\x3d\x20\x73\x63\x68\x65\x64\x75\x6c\x65\x72\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x61\x63\x74\x69\x76\x65\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x64\x65\x70\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x72\x65\x63\x6f\x72\x64\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x28\x74\x68\x69\x73\x2c\x20\x73\x63\x6f\x70\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x75\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x74\x68\x69\x73\x2e\x61\x63\x74\x69\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x2e\x66\x6e\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6c\x61\x73\x74\x53\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x20\x3d\x20\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x70\x61\x72\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x72\x65\x6e\x74\x20\x3d\x3d\x3d\x20\x74\x68\x69\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x74\x72\x79\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x20\x3d\x20\x74\x68\x69\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x4f\x70\x42\x69\x74\x20\x3d\x20\x31\x20\x3c\x3c\x20\x2b\x2b\x65\x66\x66\x65\x63\x74\x54\x72\x61\x63\x6b\x44\x65\x70\x74\x68\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x66\x66\x65\x63\x74\x54\x72\x61\x63\x6b\x44\x65\x70\x74\x68\x20\x3c\x3d\x20\x6d\x61\x78\x4d\x61\x72\x6b\x65\x72\x42\x69\x74\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x69\x74\x44\x65\x70\x4d\x61\x72\x6b\x65\x72\x73\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6c\x65\x61\x6e\x75\x70\x45\x66\x66\x65\x63\x74\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x2e\x66\x6e\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x66\x69\x6e\x61\x6c\x6c\x79\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x66\x66\x65\x63\x74\x54\x72\x61\x63\x6b\x44\x65\x70\x74\x68\x20\x3c\x3d\x20\x6d\x61\x78\x4d\x61\x72\x6b\x65\x72\x42\x69\x74\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x69\x6e\x61\x6c\x69\x7a\x65\x44\x65\x70\x4d\x61\x72\x6b\x65\x72\x73\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x4f\x70\x42\x69\x74\x20\x3d\x20\x31\x20\x3c\x3c\x20\x2d\x2d\x65\x66\x66\x65\x63\x74\x54\x72\x61\x63\x6b\x44\x65\x70\x74\x68\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x20\x3d\x20\x74\x68\x69\x73\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x20\x3d\x20\x6c\x61\x73\x74\x53\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x68\x69\x73\x2e\x64\x65\x66\x65\x72\x53\x74\x6f\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x73\x74\x6f\x70\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x73\x74\x6f\x70\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x20\x3d\x3d\x3d\x20\x74\x68\x69\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x64\x65\x66\x65\x72\x53\x74\x6f\x70\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x68\x69\x73\x2e\x61\x63\x74\x69\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6c\x65\x61\x6e\x75\x70\x45\x66\x66\x65\x63\x74\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x68\x69\x73\x2e\x6f\x6e\x53\x74\x6f\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x6f\x6e\x53\x74\x6f\x70\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x61\x63\x74\x69\x76\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x6c\x65\x61\x6e\x75\x70\x45\x66\x66\x65\x63\x74\x28\x65\x66\x66\x65\x63\x74\x32\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x64\x65\x70\x73\x20\x7d\x20\x3d\x20\x65\x66\x66\x65\x63\x74\x32\x3b\x0a\x20\x20\x69\x66\x20\x28\x64\x65\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x64\x65\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x5b\x69\x5d\x2e\x64\x65\x6c\x65\x74\x65\x28\x65\x66\x66\x65\x63\x74\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x64\x65\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x30\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x65\x66\x66\x65\x63\x74\x28\x66\x6e\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x66\x6e\x2e\x65\x66\x66\x65\x63\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6e\x20\x3d\x20\x66\x6e\x2e\x65\x66\x66\x65\x63\x74\x2e\x66\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x5f\x65\x66\x66\x65\x63\x74\x20\x3d\x20\x6e\x65\x77\x20\x52\x65\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x28\x66\x6e\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x78\x74\x65\x6e\x64\x28\x5f\x65\x66\x66\x65\x63\x74\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2e\x73\x63\x6f\x70\x65\x29\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x63\x6f\x72\x64\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x28\x5f\x65\x66\x66\x65\x63\x74\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x2e\x73\x63\x6f\x70\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x21\x6f\x70\x74\x69\x6f\x6e\x73\x20\x7c\x7c\x20\x21\x6f\x70\x74\x69\x6f\x6e\x73\x2e\x6c\x61\x7a\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x5f\x65\x66\x66\x65\x63\x74\x2e\x72\x75\x6e\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x75\x6e\x6e\x65\x72\x20\x3d\x20\x5f\x65\x66\x66\x65\x63\x74\x2e\x72\x75\x6e\x2e\x62\x69\x6e\x64\x28\x5f\x65\x66\x66\x65\x63\x74\x29\x3b\x0a\x20\x20\x72\x75\x6e\x6e\x65\x72\x2e\x65\x66\x66\x65\x63\x74\x20\x3d\x20\x5f\x65\x66\x66\x65\x63\x74\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x75\x6e\x6e\x65\x72\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x74\x6f\x70\x28\x72\x75\x6e\x6e\x65\x72\x29\x20\x7b\x0a\x20\x20\x72\x75\x6e\x6e\x65\x72\x2e\x65\x66\x66\x65\x63\x74\x2e\x73\x74\x6f\x70\x28\x29\x3b\x0a\x7d\x0a\x6c\x65\x74\x20\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x74\x72\x61\x63\x6b\x53\x74\x61\x63\x6b\x20\x3d\x20\x5b\x5d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x61\x75\x73\x65\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x20\x7b\x0a\x20\x20\x74\x72\x61\x63\x6b\x53\x74\x61\x63\x6b\x2e\x70\x75\x73\x68\x28\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x29\x3b\x0a\x20\x20\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x65\x74\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x61\x73\x74\x20\x3d\x20\x74\x72\x61\x63\x6b\x53\x74\x61\x63\x6b\x2e\x70\x6f\x70\x28\x29\x3b\x0a\x20\x20\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x20\x3d\x20\x6c\x61\x73\x74\x20\x3d\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x74\x72\x75\x65\x20\x3a\x20\x6c\x61\x73\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x61\x63\x6b\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x74\x79\x70\x65\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x20\x26\x26\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x64\x65\x70\x73\x4d\x61\x70\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x4d\x61\x70\x2e\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x64\x65\x70\x73\x4d\x61\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x4d\x61\x70\x2e\x73\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x64\x65\x70\x73\x4d\x61\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x4d\x61\x70\x28\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x64\x65\x70\x20\x3d\x20\x64\x65\x70\x73\x4d\x61\x70\x2e\x67\x65\x74\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x64\x65\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x4d\x61\x70\x2e\x73\x65\x74\x28\x6b\x65\x79\x2c\x20\x64\x65\x70\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x44\x65\x70\x28\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x45\x66\x66\x65\x63\x74\x73\x28\x64\x65\x70\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x61\x63\x6b\x45\x66\x66\x65\x63\x74\x73\x28\x64\x65\x70\x2c\x20\x64\x65\x62\x75\x67\x67\x65\x72\x45\x76\x65\x6e\x74\x45\x78\x74\x72\x61\x49\x6e\x66\x6f\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x32\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x65\x66\x66\x65\x63\x74\x54\x72\x61\x63\x6b\x44\x65\x70\x74\x68\x20\x3c\x3d\x20\x6d\x61\x78\x4d\x61\x72\x6b\x65\x72\x42\x69\x74\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x6e\x65\x77\x54\x72\x61\x63\x6b\x65\x64\x28\x64\x65\x70\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x64\x65\x70\x2e\x6e\x20\x7c\x3d\x20\x74\x72\x61\x63\x6b\x4f\x70\x42\x69\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x32\x20\x3d\x20\x21\x77\x61\x73\x54\x72\x61\x63\x6b\x65\x64\x28\x64\x65\x70\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x32\x20\x3d\x20\x21\x64\x65\x70\x2e\x68\x61\x73\x28\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x64\x65\x70\x2e\x61\x64\x64\x28\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x29\x3b\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x2e\x64\x65\x70\x73\x2e\x70\x75\x73\x68\x28\x64\x65\x70\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x69\x67\x67\x65\x72\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x74\x79\x70\x65\x2c\x20\x6b\x65\x79\x2c\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x2c\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x2c\x20\x6f\x6c\x64\x54\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x65\x70\x73\x4d\x61\x70\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x4d\x61\x70\x2e\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x64\x65\x70\x73\x4d\x61\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6c\x65\x74\x20\x64\x65\x70\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x63\x6c\x65\x61\x72\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x64\x65\x70\x73\x20\x3d\x20\x5b\x2e\x2e\x2e\x64\x65\x70\x73\x4d\x61\x70\x2e\x76\x61\x6c\x75\x65\x73\x28\x29\x5d\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x6c\x65\x6e\x67\x74\x68\x22\x20\x26\x26\x20\x69\x73\x41\x72\x72\x61\x79\x28\x74\x61\x72\x67\x65\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x64\x65\x70\x73\x4d\x61\x70\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x64\x65\x70\x2c\x20\x6b\x65\x79\x32\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x32\x20\x3d\x3d\x3d\x20\x22\x6c\x65\x6e\x67\x74\x68\x22\x20\x7c\x7c\x20\x6b\x65\x79\x32\x20\x3e\x3d\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x2e\x70\x75\x73\x68\x28\x64\x65\x70\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x2e\x70\x75\x73\x68\x28\x64\x65\x70\x73\x4d\x61\x70\x2e\x67\x65\x74\x28\x6b\x65\x79\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x73\x77\x69\x74\x63\x68\x20\x28\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x61\x64\x64\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x41\x72\x72\x61\x79\x28\x74\x61\x72\x67\x65\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x2e\x70\x75\x73\x68\x28\x64\x65\x70\x73\x4d\x61\x70\x2e\x67\x65\x74\x28\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4d\x61\x70\x24\x31\x28\x74\x61\x72\x67\x65\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x2e\x70\x75\x73\x68\x28\x64\x65\x70\x73\x4d\x61\x70\x2e\x67\x65\x74\x28\x4d\x41\x50\x5f\x4b\x45\x59\x5f\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x49\x6e\x74\x65\x67\x65\x72\x4b\x65\x79\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x2e\x70\x75\x73\x68\x28\x64\x65\x70\x73\x4d\x61\x70\x2e\x67\x65\x74\x28\x22\x6c\x65\x6e\x67\x74\x68\x22\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x64\x65\x6c\x65\x74\x65\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x41\x72\x72\x61\x79\x28\x74\x61\x72\x67\x65\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x2e\x70\x75\x73\x68\x28\x64\x65\x70\x73\x4d\x61\x70\x2e\x67\x65\x74\x28\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4d\x61\x70\x24\x31\x28\x74\x61\x72\x67\x65\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x2e\x70\x75\x73\x68\x28\x64\x65\x70\x73\x4d\x61\x70\x2e\x67\x65\x74\x28\x4d\x41\x50\x5f\x4b\x45\x59\x5f\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x73\x65\x74\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4d\x61\x70\x24\x31\x28\x74\x61\x72\x67\x65\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x70\x73\x2e\x70\x75\x73\x68\x28\x64\x65\x70\x73\x4d\x61\x70\x2e\x67\x65\x74\x28\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x64\x65\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x3d\x3d\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x64\x65\x70\x73\x5b\x30\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x45\x66\x66\x65\x63\x74\x73\x28\x64\x65\x70\x73\x5b\x30\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x66\x66\x65\x63\x74\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x64\x65\x70\x20\x6f\x66\x20\x64\x65\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x65\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x66\x66\x65\x63\x74\x73\x2e\x70\x75\x73\x68\x28\x2e\x2e\x2e\x64\x65\x70\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x45\x66\x66\x65\x63\x74\x73\x28\x63\x72\x65\x61\x74\x65\x44\x65\x70\x28\x65\x66\x66\x65\x63\x74\x73\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x69\x67\x67\x65\x72\x45\x66\x66\x65\x63\x74\x73\x28\x64\x65\x70\x2c\x20\x64\x65\x62\x75\x67\x67\x65\x72\x45\x76\x65\x6e\x74\x45\x78\x74\x72\x61\x49\x6e\x66\x6f\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x66\x66\x65\x63\x74\x73\x20\x3d\x20\x69\x73\x41\x72\x72\x61\x79\x28\x64\x65\x70\x29\x20\x3f\x20\x64\x65\x70\x20\x3a\x20\x5b\x2e\x2e\x2e\x64\x65\x70\x5d\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x65\x66\x66\x65\x63\x74\x32\x20\x6f\x66\x20\x65\x66\x66\x65\x63\x74\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x65\x66\x66\x65\x63\x74\x32\x2e\x63\x6f\x6d\x70\x75\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x45\x66\x66\x65\x63\x74\x28\x65\x66\x66\x65\x63\x74\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x65\x66\x66\x65\x63\x74\x32\x20\x6f\x66\x20\x65\x66\x66\x65\x63\x74\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x65\x66\x66\x65\x63\x74\x32\x2e\x63\x6f\x6d\x70\x75\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x45\x66\x66\x65\x63\x74\x28\x65\x66\x66\x65\x63\x74\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x69\x67\x67\x65\x72\x45\x66\x66\x65\x63\x74\x28\x65\x66\x66\x65\x63\x74\x32\x2c\x20\x64\x65\x62\x75\x67\x67\x65\x72\x45\x76\x65\x6e\x74\x45\x78\x74\x72\x61\x49\x6e\x66\x6f\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x65\x66\x66\x65\x63\x74\x32\x20\x21\x3d\x3d\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x20\x7c\x7c\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x61\x6c\x6c\x6f\x77\x52\x65\x63\x75\x72\x73\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x65\x66\x66\x65\x63\x74\x32\x2e\x73\x63\x68\x65\x64\x75\x6c\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x73\x63\x68\x65\x64\x75\x6c\x65\x72\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x72\x75\x6e\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x4e\x6f\x6e\x54\x72\x61\x63\x6b\x61\x62\x6c\x65\x4b\x65\x79\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6d\x61\x6b\x65\x4d\x61\x70\x28\x60\x5f\x5f\x70\x72\x6f\x74\x6f\x5f\x5f\x2c\x5f\x5f\x76\x5f\x69\x73\x52\x65\x66\x2c\x5f\x5f\x69\x73\x56\x75\x65\x60\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x62\x75\x69\x6c\x74\x49\x6e\x53\x79\x6d\x62\x6f\x6c\x73\x20\x3d\x20\x6e\x65\x77\x20\x53\x65\x74\x28\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x67\x65\x74\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x4e\x61\x6d\x65\x73\x28\x53\x79\x6d\x62\x6f\x6c\x29\x2e\x66\x69\x6c\x74\x65\x72\x28\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x6b\x65\x79\x20\x21\x3d\x3d\x20\x22\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x22\x20\x26\x26\x20\x6b\x65\x79\x20\x21\x3d\x3d\x20\x22\x63\x61\x6c\x6c\x65\x72\x22\x29\x2e\x6d\x61\x70\x28\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x53\x79\x6d\x62\x6f\x6c\x5b\x6b\x65\x79\x5d\x29\x2e\x66\x69\x6c\x74\x65\x72\x28\x69\x73\x53\x79\x6d\x62\x6f\x6c\x29\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x47\x65\x74\x74\x65\x72\x28\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x47\x65\x74\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x47\x65\x74\x74\x65\x72\x28\x66\x61\x6c\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x47\x65\x74\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x47\x65\x74\x74\x65\x72\x28\x74\x72\x75\x65\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x47\x65\x74\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x47\x65\x74\x74\x65\x72\x28\x74\x72\x75\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x61\x72\x72\x61\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x41\x72\x72\x61\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x28\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x41\x72\x72\x61\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x28\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x5b\x22\x69\x6e\x63\x6c\x75\x64\x65\x73\x22\x2c\x20\x22\x69\x6e\x64\x65\x78\x4f\x66\x22\x2c\x20\x22\x6c\x61\x73\x74\x49\x6e\x64\x65\x78\x4f\x66\x22\x5d\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x72\x72\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x2c\x20\x6c\x20\x3d\x20\x74\x68\x69\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x20\x3c\x20\x6c\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x28\x61\x72\x72\x2c\x20\x22\x67\x65\x74\x22\x2c\x20\x69\x20\x2b\x20\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x61\x72\x72\x5b\x6b\x65\x79\x5d\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x72\x65\x73\x20\x3d\x3d\x3d\x20\x2d\x31\x20\x7c\x7c\x20\x72\x65\x73\x20\x3d\x3d\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x72\x72\x5b\x6b\x65\x79\x5d\x28\x2e\x2e\x2e\x61\x72\x67\x73\x2e\x6d\x61\x70\x28\x74\x6f\x52\x61\x77\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x20\x20\x5b\x22\x70\x75\x73\x68\x22\x2c\x20\x22\x70\x6f\x70\x22\x2c\x20\x22\x73\x68\x69\x66\x74\x22\x2c\x20\x22\x75\x6e\x73\x68\x69\x66\x74\x22\x2c\x20\x22\x73\x70\x6c\x69\x63\x65\x22\x5d\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x75\x73\x65\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x68\x69\x73\x29\x5b\x6b\x65\x79\x5d\x2e\x61\x70\x70\x6c\x79\x28\x74\x68\x69\x73\x2c\x20\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x65\x74\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x47\x65\x74\x74\x65\x72\x28\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3d\x20\x66\x61\x6c\x73\x65\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x32\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x5f\x5f\x76\x5f\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x5f\x5f\x76\x5f\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x5f\x5f\x76\x5f\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x68\x61\x6c\x6c\x6f\x77\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x5f\x5f\x76\x5f\x72\x61\x77\x22\x20\x26\x26\x20\x72\x65\x63\x65\x69\x76\x65\x72\x20\x3d\x3d\x3d\x20\x28\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3f\x20\x73\x68\x61\x6c\x6c\x6f\x77\x20\x3f\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x61\x70\x20\x3a\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x61\x70\x20\x3a\x20\x73\x68\x61\x6c\x6c\x6f\x77\x20\x3f\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x63\x74\x69\x76\x65\x4d\x61\x70\x20\x3a\x20\x72\x65\x61\x63\x74\x69\x76\x65\x4d\x61\x70\x29\x2e\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x49\x73\x41\x72\x72\x61\x79\x20\x3d\x20\x69\x73\x41\x72\x72\x61\x79\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x26\x26\x20\x74\x61\x72\x67\x65\x74\x49\x73\x41\x72\x72\x61\x79\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x61\x72\x72\x61\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x67\x65\x74\x28\x61\x72\x72\x61\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x2c\x20\x6b\x65\x79\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x53\x79\x6d\x62\x6f\x6c\x28\x6b\x65\x79\x29\x20\x3f\x20\x62\x75\x69\x6c\x74\x49\x6e\x53\x79\x6d\x62\x6f\x6c\x73\x2e\x68\x61\x73\x28\x6b\x65\x79\x29\x20\x3a\x20\x69\x73\x4e\x6f\x6e\x54\x72\x61\x63\x6b\x61\x62\x6c\x65\x4b\x65\x79\x73\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x67\x65\x74\x22\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x6c\x6c\x6f\x77\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x66\x28\x72\x65\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x49\x73\x41\x72\x72\x61\x79\x20\x26\x26\x20\x69\x73\x49\x6e\x74\x65\x67\x65\x72\x4b\x65\x79\x28\x6b\x65\x79\x29\x20\x3f\x20\x72\x65\x73\x20\x3a\x20\x72\x65\x73\x2e\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x72\x65\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3f\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x28\x72\x65\x73\x29\x20\x3a\x20\x72\x65\x61\x63\x74\x69\x76\x65\x28\x72\x65\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x73\x65\x74\x24\x31\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x53\x65\x74\x74\x65\x72\x28\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x53\x65\x74\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x53\x65\x74\x74\x65\x72\x28\x74\x72\x75\x65\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x53\x65\x74\x74\x65\x72\x28\x73\x68\x61\x6c\x6c\x6f\x77\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x32\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x28\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x20\x26\x26\x20\x69\x73\x52\x65\x66\x28\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x20\x26\x26\x20\x21\x69\x73\x52\x65\x66\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x73\x68\x61\x6c\x6c\x6f\x77\x20\x26\x26\x20\x21\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x41\x72\x72\x61\x79\x28\x74\x61\x72\x67\x65\x74\x29\x20\x26\x26\x20\x69\x73\x52\x65\x66\x28\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x20\x26\x26\x20\x21\x69\x73\x52\x65\x66\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x64\x4b\x65\x79\x20\x3d\x20\x69\x73\x41\x72\x72\x61\x79\x28\x74\x61\x72\x67\x65\x74\x29\x20\x26\x26\x20\x69\x73\x49\x6e\x74\x65\x67\x65\x72\x4b\x65\x79\x28\x6b\x65\x79\x29\x20\x3f\x20\x4e\x75\x6d\x62\x65\x72\x28\x6b\x65\x79\x29\x20\x3c\x20\x74\x61\x72\x67\x65\x74\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3a\x20\x68\x61\x73\x4f\x77\x6e\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x73\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x20\x3d\x3d\x3d\x20\x74\x6f\x52\x61\x77\x28\x72\x65\x63\x65\x69\x76\x65\x72\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x68\x61\x64\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x61\x64\x64\x22\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x68\x61\x73\x43\x68\x61\x6e\x67\x65\x64\x28\x76\x61\x6c\x75\x65\x2c\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x73\x65\x74\x22\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x75\x6c\x74\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x64\x65\x6c\x65\x74\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x64\x4b\x65\x79\x20\x3d\x20\x68\x61\x73\x4f\x77\x6e\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x74\x61\x72\x67\x65\x74\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x64\x65\x6c\x65\x74\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x72\x65\x73\x75\x6c\x74\x20\x26\x26\x20\x68\x61\x64\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x64\x65\x6c\x65\x74\x65\x22\x2c\x20\x6b\x65\x79\x2c\x20\x76\x6f\x69\x64\x20\x30\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x75\x6c\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x68\x61\x73\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x68\x61\x73\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x53\x79\x6d\x62\x6f\x6c\x28\x6b\x65\x79\x29\x20\x7c\x7c\x20\x21\x62\x75\x69\x6c\x74\x49\x6e\x53\x79\x6d\x62\x6f\x6c\x73\x2e\x68\x61\x73\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x68\x61\x73\x22\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x75\x6c\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6f\x77\x6e\x4b\x65\x79\x73\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x74\x72\x61\x63\x6b\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x69\x74\x65\x72\x61\x74\x65\x22\x2c\x20\x69\x73\x41\x72\x72\x61\x79\x28\x74\x61\x72\x67\x65\x74\x29\x20\x3f\x20\x22\x6c\x65\x6e\x67\x74\x68\x22\x20\x3a\x20\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x6f\x77\x6e\x4b\x65\x79\x73\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x6d\x75\x74\x61\x62\x6c\x65\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x7b\x0a\x20\x20\x67\x65\x74\x2c\x0a\x20\x20\x73\x65\x74\x3a\x20\x73\x65\x74\x24\x31\x2c\x0a\x20\x20\x64\x65\x6c\x65\x74\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x2c\x0a\x20\x20\x68\x61\x73\x2c\x0a\x20\x20\x6f\x77\x6e\x4b\x65\x79\x73\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x7b\x0a\x20\x20\x67\x65\x74\x3a\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x47\x65\x74\x2c\x0a\x20\x20\x73\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x64\x65\x6c\x65\x74\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x63\x74\x69\x76\x65\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x65\x78\x74\x65\x6e\x64\x28\x7b\x7d\x2c\x20\x6d\x75\x74\x61\x62\x6c\x65\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x7b\x0a\x20\x20\x67\x65\x74\x3a\x20\x73\x68\x61\x6c\x6c\x6f\x77\x47\x65\x74\x2c\x0a\x20\x20\x73\x65\x74\x3a\x20\x73\x68\x61\x6c\x6c\x6f\x77\x53\x65\x74\x0a\x7d\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x65\x78\x74\x65\x6e\x64\x28\x7b\x7d\x2c\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x7b\x0a\x20\x20\x67\x65\x74\x3a\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x47\x65\x74\x0a\x7d\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x74\x6f\x53\x68\x61\x6c\x6c\x6f\x77\x20\x3d\x20\x28\x76\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x50\x72\x6f\x74\x6f\x20\x3d\x20\x28\x76\x29\x20\x3d\x3e\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x67\x65\x74\x50\x72\x6f\x74\x6f\x74\x79\x70\x65\x4f\x66\x28\x76\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x24\x31\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3d\x20\x66\x61\x6c\x73\x65\x2c\x20\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x32\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x5b\x22\x5f\x5f\x76\x5f\x72\x61\x77\x22\x5d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x54\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x4b\x65\x79\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x21\x3d\x3d\x20\x72\x61\x77\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x28\x72\x61\x77\x54\x61\x72\x67\x65\x74\x2c\x20\x22\x67\x65\x74\x22\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x28\x72\x61\x77\x54\x61\x72\x67\x65\x74\x2c\x20\x22\x67\x65\x74\x22\x2c\x20\x72\x61\x77\x4b\x65\x79\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x68\x61\x73\x3a\x20\x68\x61\x73\x32\x20\x7d\x20\x3d\x20\x67\x65\x74\x50\x72\x6f\x74\x6f\x28\x72\x61\x77\x54\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x77\x72\x61\x70\x20\x3d\x20\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x32\x20\x3f\x20\x74\x6f\x53\x68\x61\x6c\x6c\x6f\x77\x20\x3a\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3f\x20\x74\x6f\x52\x65\x61\x64\x6f\x6e\x6c\x79\x20\x3a\x20\x74\x6f\x52\x65\x61\x63\x74\x69\x76\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x68\x61\x73\x32\x2e\x63\x61\x6c\x6c\x28\x72\x61\x77\x54\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x77\x72\x61\x70\x28\x74\x61\x72\x67\x65\x74\x2e\x67\x65\x74\x28\x6b\x65\x79\x29\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x68\x61\x73\x32\x2e\x63\x61\x6c\x6c\x28\x72\x61\x77\x54\x61\x72\x67\x65\x74\x2c\x20\x72\x61\x77\x4b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x77\x72\x61\x70\x28\x74\x61\x72\x67\x65\x74\x2e\x67\x65\x74\x28\x72\x61\x77\x4b\x65\x79\x29\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x20\x21\x3d\x3d\x20\x72\x61\x77\x54\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x2e\x67\x65\x74\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x68\x61\x73\x24\x31\x28\x6b\x65\x79\x2c\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x68\x69\x73\x5b\x22\x5f\x5f\x76\x5f\x72\x61\x77\x22\x5d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x54\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x4b\x65\x79\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x21\x3d\x3d\x20\x72\x61\x77\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x28\x72\x61\x77\x54\x61\x72\x67\x65\x74\x2c\x20\x22\x68\x61\x73\x22\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x28\x72\x61\x77\x54\x61\x72\x67\x65\x74\x2c\x20\x22\x68\x61\x73\x22\x2c\x20\x72\x61\x77\x4b\x65\x79\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x72\x61\x77\x4b\x65\x79\x20\x3f\x20\x74\x61\x72\x67\x65\x74\x2e\x68\x61\x73\x28\x6b\x65\x79\x29\x20\x3a\x20\x74\x61\x72\x67\x65\x74\x2e\x68\x61\x73\x28\x6b\x65\x79\x29\x20\x7c\x7c\x20\x74\x61\x72\x67\x65\x74\x2e\x68\x61\x73\x28\x72\x61\x77\x4b\x65\x79\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x69\x7a\x65\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x5b\x22\x5f\x5f\x76\x5f\x72\x61\x77\x22\x5d\x3b\x0a\x20\x20\x21\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x26\x26\x20\x74\x72\x61\x63\x6b\x28\x74\x6f\x52\x61\x77\x28\x74\x61\x72\x67\x65\x74\x29\x2c\x20\x22\x69\x74\x65\x72\x61\x74\x65\x22\x2c\x20\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x73\x69\x7a\x65\x22\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x61\x64\x64\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x74\x6f\x20\x3d\x20\x67\x65\x74\x50\x72\x6f\x74\x6f\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x64\x4b\x65\x79\x20\x3d\x20\x70\x72\x6f\x74\x6f\x2e\x68\x61\x73\x2e\x63\x61\x6c\x6c\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x68\x61\x64\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x2e\x61\x64\x64\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x61\x64\x64\x22\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x24\x31\x24\x31\x28\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x68\x61\x73\x3a\x20\x68\x61\x73\x32\x2c\x20\x67\x65\x74\x3a\x20\x67\x65\x74\x32\x20\x7d\x20\x3d\x20\x67\x65\x74\x50\x72\x6f\x74\x6f\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x6c\x65\x74\x20\x68\x61\x64\x4b\x65\x79\x20\x3d\x20\x68\x61\x73\x32\x2e\x63\x61\x6c\x6c\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x68\x61\x64\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x6b\x65\x79\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x68\x61\x64\x4b\x65\x79\x20\x3d\x20\x68\x61\x73\x32\x2e\x63\x61\x6c\x6c\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x3d\x20\x67\x65\x74\x32\x2e\x63\x61\x6c\x6c\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x74\x61\x72\x67\x65\x74\x2e\x73\x65\x74\x28\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x68\x61\x64\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x61\x64\x64\x22\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x68\x61\x73\x43\x68\x61\x6e\x67\x65\x64\x28\x76\x61\x6c\x75\x65\x2c\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x73\x65\x74\x22\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x64\x65\x6c\x65\x74\x65\x45\x6e\x74\x72\x79\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x68\x61\x73\x3a\x20\x68\x61\x73\x32\x2c\x20\x67\x65\x74\x3a\x20\x67\x65\x74\x32\x20\x7d\x20\x3d\x20\x67\x65\x74\x50\x72\x6f\x74\x6f\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x6c\x65\x74\x20\x68\x61\x64\x4b\x65\x79\x20\x3d\x20\x68\x61\x73\x32\x2e\x63\x61\x6c\x6c\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x68\x61\x64\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x6b\x65\x79\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x68\x61\x64\x4b\x65\x79\x20\x3d\x20\x68\x61\x73\x32\x2e\x63\x61\x6c\x6c\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x67\x65\x74\x32\x20\x3f\x20\x67\x65\x74\x32\x2e\x63\x61\x6c\x6c\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x20\x3a\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x2e\x64\x65\x6c\x65\x74\x65\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x68\x61\x64\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x64\x65\x6c\x65\x74\x65\x22\x2c\x20\x6b\x65\x79\x2c\x20\x76\x6f\x69\x64\x20\x30\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x75\x6c\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x6c\x65\x61\x72\x28\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x64\x49\x74\x65\x6d\x73\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x2e\x73\x69\x7a\x65\x20\x21\x3d\x3d\x20\x30\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x2e\x63\x6c\x65\x61\x72\x28\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x68\x61\x64\x49\x74\x65\x6d\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x22\x63\x6c\x65\x61\x72\x22\x2c\x20\x76\x6f\x69\x64\x20\x30\x2c\x20\x76\x6f\x69\x64\x20\x30\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x75\x6c\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x46\x6f\x72\x45\x61\x63\x68\x28\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x2c\x20\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x32\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6f\x72\x45\x61\x63\x68\x28\x63\x61\x6c\x6c\x62\x61\x63\x6b\x2c\x20\x74\x68\x69\x73\x41\x72\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x62\x73\x65\x72\x76\x65\x64\x20\x3d\x20\x74\x68\x69\x73\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x6f\x62\x73\x65\x72\x76\x65\x64\x5b\x22\x5f\x5f\x76\x5f\x72\x61\x77\x22\x5d\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x54\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x77\x72\x61\x70\x20\x3d\x20\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x32\x20\x3f\x20\x74\x6f\x53\x68\x61\x6c\x6c\x6f\x77\x20\x3a\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3f\x20\x74\x6f\x52\x65\x61\x64\x6f\x6e\x6c\x79\x20\x3a\x20\x74\x6f\x52\x65\x61\x63\x74\x69\x76\x65\x3b\x0a\x20\x20\x20\x20\x21\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x26\x26\x20\x74\x72\x61\x63\x6b\x28\x72\x61\x77\x54\x61\x72\x67\x65\x74\x2c\x20\x22\x69\x74\x65\x72\x61\x74\x65\x22\x2c\x20\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x76\x61\x6c\x75\x65\x2c\x20\x6b\x65\x79\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x61\x6c\x6c\x62\x61\x63\x6b\x2e\x63\x61\x6c\x6c\x28\x74\x68\x69\x73\x41\x72\x67\x2c\x20\x77\x72\x61\x70\x28\x76\x61\x6c\x75\x65\x29\x2c\x20\x77\x72\x61\x70\x28\x6b\x65\x79\x29\x2c\x20\x6f\x62\x73\x65\x72\x76\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x49\x74\x65\x72\x61\x62\x6c\x65\x4d\x65\x74\x68\x6f\x64\x28\x6d\x65\x74\x68\x6f\x64\x2c\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x2c\x20\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x32\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x68\x69\x73\x5b\x22\x5f\x5f\x76\x5f\x72\x61\x77\x22\x5d\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x54\x61\x72\x67\x65\x74\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x49\x73\x4d\x61\x70\x20\x3d\x20\x69\x73\x4d\x61\x70\x24\x31\x28\x72\x61\x77\x54\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x50\x61\x69\x72\x32\x20\x3d\x20\x6d\x65\x74\x68\x6f\x64\x20\x3d\x3d\x3d\x20\x22\x65\x6e\x74\x72\x69\x65\x73\x22\x20\x7c\x7c\x20\x6d\x65\x74\x68\x6f\x64\x20\x3d\x3d\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x2e\x69\x74\x65\x72\x61\x74\x6f\x72\x20\x26\x26\x20\x74\x61\x72\x67\x65\x74\x49\x73\x4d\x61\x70\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x4b\x65\x79\x4f\x6e\x6c\x79\x20\x3d\x20\x6d\x65\x74\x68\x6f\x64\x20\x3d\x3d\x3d\x20\x22\x6b\x65\x79\x73\x22\x20\x26\x26\x20\x74\x61\x72\x67\x65\x74\x49\x73\x4d\x61\x70\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x6e\x65\x72\x49\x74\x65\x72\x61\x74\x6f\x72\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x5b\x6d\x65\x74\x68\x6f\x64\x5d\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x77\x72\x61\x70\x20\x3d\x20\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x32\x20\x3f\x20\x74\x6f\x53\x68\x61\x6c\x6c\x6f\x77\x20\x3a\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3f\x20\x74\x6f\x52\x65\x61\x64\x6f\x6e\x6c\x79\x20\x3a\x20\x74\x6f\x52\x65\x61\x63\x74\x69\x76\x65\x3b\x0a\x20\x20\x20\x20\x21\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x26\x26\x20\x74\x72\x61\x63\x6b\x28\x72\x61\x77\x54\x61\x72\x67\x65\x74\x2c\x20\x22\x69\x74\x65\x72\x61\x74\x65\x22\x2c\x20\x69\x73\x4b\x65\x79\x4f\x6e\x6c\x79\x20\x3f\x20\x4d\x41\x50\x5f\x4b\x45\x59\x5f\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x20\x3a\x20\x49\x54\x45\x52\x41\x54\x45\x5f\x4b\x45\x59\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x76\x61\x6c\x75\x65\x2c\x20\x64\x6f\x6e\x65\x20\x7d\x20\x3d\x20\x69\x6e\x6e\x65\x72\x49\x74\x65\x72\x61\x74\x6f\x72\x2e\x6e\x65\x78\x74\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x6f\x6e\x65\x20\x3f\x20\x7b\x20\x76\x61\x6c\x75\x65\x2c\x20\x64\x6f\x6e\x65\x20\x7d\x20\x3a\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x3a\x20\x69\x73\x50\x61\x69\x72\x32\x20\x3f\x20\x5b\x77\x72\x61\x70\x28\x76\x61\x6c\x75\x65\x5b\x30\x5d\x29\x2c\x20\x77\x72\x61\x70\x28\x76\x61\x6c\x75\x65\x5b\x31\x5d\x29\x5d\x20\x3a\x20\x77\x72\x61\x70\x28\x76\x61\x6c\x75\x65\x29\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6f\x6e\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x5b\x53\x79\x6d\x62\x6f\x6c\x2e\x69\x74\x65\x72\x61\x74\x6f\x72\x5d\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x65\x74\x68\x6f\x64\x28\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x64\x65\x6c\x65\x74\x65\x22\x20\x3f\x20\x66\x61\x6c\x73\x65\x20\x3a\x20\x74\x68\x69\x73\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x28\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x75\x74\x61\x62\x6c\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x67\x65\x74\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x24\x31\x28\x74\x68\x69\x73\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x67\x65\x74\x20\x73\x69\x7a\x65\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x69\x7a\x65\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x68\x61\x73\x3a\x20\x68\x61\x73\x24\x31\x2c\x0a\x20\x20\x20\x20\x61\x64\x64\x2c\x0a\x20\x20\x20\x20\x73\x65\x74\x3a\x20\x73\x65\x74\x24\x31\x24\x31\x2c\x0a\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x3a\x20\x64\x65\x6c\x65\x74\x65\x45\x6e\x74\x72\x79\x2c\x0a\x20\x20\x20\x20\x63\x6c\x65\x61\x72\x2c\x0a\x20\x20\x20\x20\x66\x6f\x72\x45\x61\x63\x68\x3a\x20\x63\x72\x65\x61\x74\x65\x46\x6f\x72\x45\x61\x63\x68\x28\x66\x61\x6c\x73\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x67\x65\x74\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x24\x31\x28\x74\x68\x69\x73\x2c\x20\x6b\x65\x79\x2c\x20\x66\x61\x6c\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x67\x65\x74\x20\x73\x69\x7a\x65\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x69\x7a\x65\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x68\x61\x73\x3a\x20\x68\x61\x73\x24\x31\x2c\x0a\x20\x20\x20\x20\x61\x64\x64\x2c\x0a\x20\x20\x20\x20\x73\x65\x74\x3a\x20\x73\x65\x74\x24\x31\x24\x31\x2c\x0a\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x3a\x20\x64\x65\x6c\x65\x74\x65\x45\x6e\x74\x72\x79\x2c\x0a\x20\x20\x20\x20\x63\x6c\x65\x61\x72\x2c\x0a\x20\x20\x20\x20\x66\x6f\x72\x45\x61\x63\x68\x3a\x20\x63\x72\x65\x61\x74\x65\x46\x6f\x72\x45\x61\x63\x68\x28\x66\x61\x6c\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x67\x65\x74\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x24\x31\x28\x74\x68\x69\x73\x2c\x20\x6b\x65\x79\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x67\x65\x74\x20\x73\x69\x7a\x65\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x69\x7a\x65\x28\x74\x68\x69\x73\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x68\x61\x73\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x61\x73\x24\x31\x2e\x63\x61\x6c\x6c\x28\x74\x68\x69\x73\x2c\x20\x6b\x65\x79\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x61\x64\x64\x3a\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x65\x74\x68\x6f\x64\x28\x22\x61\x64\x64\x22\x29\x2c\x0a\x20\x20\x20\x20\x73\x65\x74\x3a\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x65\x74\x68\x6f\x64\x28\x22\x73\x65\x74\x22\x29\x2c\x0a\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x3a\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x65\x74\x68\x6f\x64\x28\x22\x64\x65\x6c\x65\x74\x65\x22\x29\x2c\x0a\x20\x20\x20\x20\x63\x6c\x65\x61\x72\x3a\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x65\x74\x68\x6f\x64\x28\x22\x63\x6c\x65\x61\x72\x22\x29\x2c\x0a\x20\x20\x20\x20\x66\x6f\x72\x45\x61\x63\x68\x3a\x20\x63\x72\x65\x61\x74\x65\x46\x6f\x72\x45\x61\x63\x68\x28\x74\x72\x75\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x67\x65\x74\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x24\x31\x28\x74\x68\x69\x73\x2c\x20\x6b\x65\x79\x2c\x20\x74\x72\x75\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x67\x65\x74\x20\x73\x69\x7a\x65\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x69\x7a\x65\x28\x74\x68\x69\x73\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x68\x61\x73\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x61\x73\x24\x31\x2e\x63\x61\x6c\x6c\x28\x74\x68\x69\x73\x2c\x20\x6b\x65\x79\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x61\x64\x64\x3a\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x65\x74\x68\x6f\x64\x28\x22\x61\x64\x64\x22\x29\x2c\x0a\x20\x20\x20\x20\x73\x65\x74\x3a\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x65\x74\x68\x6f\x64\x28\x22\x73\x65\x74\x22\x29\x2c\x0a\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x3a\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x65\x74\x68\x6f\x64\x28\x22\x64\x65\x6c\x65\x74\x65\x22\x29\x2c\x0a\x20\x20\x20\x20\x63\x6c\x65\x61\x72\x3a\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x65\x74\x68\x6f\x64\x28\x22\x63\x6c\x65\x61\x72\x22\x29\x2c\x0a\x20\x20\x20\x20\x66\x6f\x72\x45\x61\x63\x68\x3a\x20\x63\x72\x65\x61\x74\x65\x46\x6f\x72\x45\x61\x63\x68\x28\x74\x72\x75\x65\x2c\x20\x74\x72\x75\x65\x29\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x74\x65\x72\x61\x74\x6f\x72\x4d\x65\x74\x68\x6f\x64\x73\x20\x3d\x20\x5b\x22\x6b\x65\x79\x73\x22\x2c\x20\x22\x76\x61\x6c\x75\x65\x73\x22\x2c\x20\x22\x65\x6e\x74\x72\x69\x65\x73\x22\x2c\x20\x53\x79\x6d\x62\x6f\x6c\x2e\x69\x74\x65\x72\x61\x74\x6f\x72\x5d\x3b\x0a\x20\x20\x69\x74\x65\x72\x61\x74\x6f\x72\x4d\x65\x74\x68\x6f\x64\x73\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x6d\x65\x74\x68\x6f\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6d\x75\x74\x61\x62\x6c\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x5b\x6d\x65\x74\x68\x6f\x64\x5d\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x49\x74\x65\x72\x61\x62\x6c\x65\x4d\x65\x74\x68\x6f\x64\x28\x6d\x65\x74\x68\x6f\x64\x2c\x20\x66\x61\x6c\x73\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x5b\x6d\x65\x74\x68\x6f\x64\x5d\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x49\x74\x65\x72\x61\x62\x6c\x65\x4d\x65\x74\x68\x6f\x64\x28\x6d\x65\x74\x68\x6f\x64\x2c\x20\x74\x72\x75\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x73\x68\x61\x6c\x6c\x6f\x77\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x5b\x6d\x65\x74\x68\x6f\x64\x5d\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x49\x74\x65\x72\x61\x62\x6c\x65\x4d\x65\x74\x68\x6f\x64\x28\x6d\x65\x74\x68\x6f\x64\x2c\x20\x66\x61\x6c\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x5b\x6d\x65\x74\x68\x6f\x64\x5d\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x49\x74\x65\x72\x61\x62\x6c\x65\x4d\x65\x74\x68\x6f\x64\x28\x6d\x65\x74\x68\x6f\x64\x2c\x20\x74\x72\x75\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5b\x0a\x20\x20\x20\x20\x6d\x75\x74\x61\x62\x6c\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x2c\x0a\x20\x20\x20\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x2c\x0a\x20\x20\x20\x20\x73\x68\x61\x6c\x6c\x6f\x77\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x2c\x0a\x20\x20\x20\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x32\x0a\x20\x20\x5d\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x5b\x6d\x75\x74\x61\x62\x6c\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x2c\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x5d\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x28\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x47\x65\x74\x74\x65\x72\x28\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x20\x3d\x20\x73\x68\x61\x6c\x6c\x6f\x77\x20\x3f\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3f\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x20\x3a\x20\x73\x68\x61\x6c\x6c\x6f\x77\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x20\x3a\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x3f\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x20\x3a\x20\x6d\x75\x74\x61\x62\x6c\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x5f\x5f\x76\x5f\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x5f\x5f\x76\x5f\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x5f\x5f\x76\x5f\x72\x61\x77\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x67\x65\x74\x28\x68\x61\x73\x4f\x77\x6e\x28\x69\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x2c\x20\x6b\x65\x79\x29\x20\x26\x26\x20\x6b\x65\x79\x20\x69\x6e\x20\x74\x61\x72\x67\x65\x74\x20\x3f\x20\x69\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x73\x20\x3a\x20\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x6d\x75\x74\x61\x62\x6c\x65\x43\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x7b\x0a\x20\x20\x67\x65\x74\x3a\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x47\x65\x74\x74\x65\x72\x28\x66\x61\x6c\x73\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x43\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x7b\x0a\x20\x20\x67\x65\x74\x3a\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x47\x65\x74\x74\x65\x72\x28\x66\x61\x6c\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x43\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x7b\x0a\x20\x20\x67\x65\x74\x3a\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x47\x65\x74\x74\x65\x72\x28\x74\x72\x75\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x43\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x7b\x0a\x20\x20\x67\x65\x74\x3a\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x73\x74\x72\x75\x6d\x65\x6e\x74\x61\x74\x69\x6f\x6e\x47\x65\x74\x74\x65\x72\x28\x74\x72\x75\x65\x2c\x20\x74\x72\x75\x65\x29\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x61\x63\x74\x69\x76\x65\x4d\x61\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x57\x65\x61\x6b\x4d\x61\x70\x28\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x63\x74\x69\x76\x65\x4d\x61\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x57\x65\x61\x6b\x4d\x61\x70\x28\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x61\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x57\x65\x61\x6b\x4d\x61\x70\x28\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x61\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x57\x65\x61\x6b\x4d\x61\x70\x28\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x61\x72\x67\x65\x74\x54\x79\x70\x65\x4d\x61\x70\x28\x72\x61\x77\x54\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x73\x77\x69\x74\x63\x68\x20\x28\x72\x61\x77\x54\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x4f\x62\x6a\x65\x63\x74\x22\x3a\x0a\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x41\x72\x72\x61\x79\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x31\x3b\x0a\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x4d\x61\x70\x22\x3a\x0a\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x53\x65\x74\x22\x3a\x0a\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x57\x65\x61\x6b\x4d\x61\x70\x22\x3a\x0a\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x57\x65\x61\x6b\x53\x65\x74\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x32\x3b\x0a\x20\x20\x20\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x30\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x54\x61\x72\x67\x65\x74\x54\x79\x70\x65\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x5b\x22\x5f\x5f\x76\x5f\x73\x6b\x69\x70\x22\x5d\x20\x7c\x7c\x20\x21\x4f\x62\x6a\x65\x63\x74\x2e\x69\x73\x45\x78\x74\x65\x6e\x73\x69\x62\x6c\x65\x28\x76\x61\x6c\x75\x65\x29\x20\x3f\x20\x30\x20\x3a\x20\x74\x61\x72\x67\x65\x74\x54\x79\x70\x65\x4d\x61\x70\x28\x74\x6f\x52\x61\x77\x54\x79\x70\x65\x28\x76\x61\x6c\x75\x65\x29\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x61\x63\x74\x69\x76\x65\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x28\x74\x61\x72\x67\x65\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x63\x74\x69\x76\x65\x4f\x62\x6a\x65\x63\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x66\x61\x6c\x73\x65\x2c\x20\x6d\x75\x74\x61\x62\x6c\x65\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x6d\x75\x74\x61\x62\x6c\x65\x43\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x72\x65\x61\x63\x74\x69\x76\x65\x4d\x61\x70\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x63\x74\x69\x76\x65\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x63\x74\x69\x76\x65\x4f\x62\x6a\x65\x63\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x66\x61\x6c\x73\x65\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x63\x74\x69\x76\x65\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x43\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x63\x74\x69\x76\x65\x4d\x61\x70\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x63\x74\x69\x76\x65\x4f\x62\x6a\x65\x63\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x74\x72\x75\x65\x2c\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x43\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x61\x70\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x63\x74\x69\x76\x65\x4f\x62\x6a\x65\x63\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x74\x72\x75\x65\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x43\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x4d\x61\x70\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x52\x65\x61\x63\x74\x69\x76\x65\x4f\x62\x6a\x65\x63\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x2c\x20\x62\x61\x73\x65\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x63\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x70\x72\x6f\x78\x79\x4d\x61\x70\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x74\x61\x72\x67\x65\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x5b\x22\x5f\x5f\x76\x5f\x72\x61\x77\x22\x5d\x20\x26\x26\x20\x21\x28\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x20\x26\x26\x20\x74\x61\x72\x67\x65\x74\x5b\x22\x5f\x5f\x76\x5f\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x22\x5d\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x50\x72\x6f\x78\x79\x20\x3d\x20\x70\x72\x6f\x78\x79\x4d\x61\x70\x2e\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x65\x78\x69\x73\x74\x69\x6e\x67\x50\x72\x6f\x78\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x50\x72\x6f\x78\x79\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x54\x79\x70\x65\x20\x3d\x20\x67\x65\x74\x54\x61\x72\x67\x65\x74\x54\x79\x70\x65\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x78\x79\x20\x3d\x20\x6e\x65\x77\x20\x50\x72\x6f\x78\x79\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x74\x61\x72\x67\x65\x74\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x32\x20\x3f\x20\x63\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3a\x20\x62\x61\x73\x65\x48\x61\x6e\x64\x6c\x65\x72\x73\x29\x3b\x0a\x20\x20\x70\x72\x6f\x78\x79\x4d\x61\x70\x2e\x73\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x70\x72\x6f\x78\x79\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x6f\x78\x79\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x28\x76\x61\x6c\x75\x65\x5b\x22\x5f\x5f\x76\x5f\x72\x61\x77\x22\x5d\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x21\x28\x76\x61\x6c\x75\x65\x20\x26\x26\x20\x76\x61\x6c\x75\x65\x5b\x22\x5f\x5f\x76\x5f\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x22\x5d\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x21\x28\x76\x61\x6c\x75\x65\x20\x26\x26\x20\x76\x61\x6c\x75\x65\x5b\x22\x5f\x5f\x76\x5f\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x22\x5d\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x21\x28\x76\x61\x6c\x75\x65\x20\x26\x26\x20\x76\x61\x6c\x75\x65\x5b\x22\x5f\x5f\x76\x5f\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x22\x5d\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x50\x72\x6f\x78\x79\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x28\x76\x61\x6c\x75\x65\x29\x20\x7c\x7c\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x6f\x52\x61\x77\x28\x6f\x62\x73\x65\x72\x76\x65\x64\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x20\x3d\x20\x6f\x62\x73\x65\x72\x76\x65\x64\x20\x26\x26\x20\x6f\x62\x73\x65\x72\x76\x65\x64\x5b\x22\x5f\x5f\x76\x5f\x72\x61\x77\x22\x5d\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x20\x3f\x20\x74\x6f\x52\x61\x77\x28\x72\x61\x77\x29\x20\x3a\x20\x6f\x62\x73\x65\x72\x76\x65\x64\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x61\x72\x6b\x52\x61\x77\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x64\x65\x66\x28\x76\x61\x6c\x75\x65\x2c\x20\x22\x5f\x5f\x76\x5f\x73\x6b\x69\x70\x22\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x74\x6f\x52\x65\x61\x63\x74\x69\x76\x65\x20\x3d\x20\x28\x76\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x76\x61\x6c\x75\x65\x29\x20\x3f\x20\x72\x65\x61\x63\x74\x69\x76\x65\x28\x76\x61\x6c\x75\x65\x29\x20\x3a\x20\x76\x61\x6c\x75\x65\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x74\x6f\x52\x65\x61\x64\x6f\x6e\x6c\x79\x20\x3d\x20\x28\x76\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x76\x61\x6c\x75\x65\x29\x20\x3f\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x28\x76\x61\x6c\x75\x65\x29\x20\x3a\x20\x76\x61\x6c\x75\x65\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x61\x63\x6b\x52\x65\x66\x56\x61\x6c\x75\x65\x28\x72\x65\x66\x32\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x73\x68\x6f\x75\x6c\x64\x54\x72\x61\x63\x6b\x20\x26\x26\x20\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x66\x32\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x72\x65\x66\x32\x29\x3b\x0a\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x45\x66\x66\x65\x63\x74\x73\x28\x72\x65\x66\x32\x2e\x64\x65\x70\x20\x7c\x7c\x20\x28\x72\x65\x66\x32\x2e\x64\x65\x70\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x44\x65\x70\x28\x29\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x69\x67\x67\x65\x72\x52\x65\x66\x56\x61\x6c\x75\x65\x28\x72\x65\x66\x32\x2c\x20\x6e\x65\x77\x56\x61\x6c\x29\x20\x7b\x0a\x20\x20\x72\x65\x66\x32\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x72\x65\x66\x32\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x72\x65\x66\x32\x2e\x64\x65\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x45\x66\x66\x65\x63\x74\x73\x28\x72\x65\x66\x32\x2e\x64\x65\x70\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x52\x65\x66\x28\x72\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x21\x28\x72\x20\x26\x26\x20\x72\x2e\x5f\x5f\x76\x5f\x69\x73\x52\x65\x66\x20\x3d\x3d\x3d\x20\x74\x72\x75\x65\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x66\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x52\x65\x66\x28\x76\x61\x6c\x75\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x66\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x52\x65\x66\x28\x76\x61\x6c\x75\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x52\x65\x66\x28\x72\x61\x77\x56\x61\x6c\x75\x65\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x66\x28\x72\x61\x77\x56\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x77\x20\x52\x65\x66\x49\x6d\x70\x6c\x28\x72\x61\x77\x56\x61\x6c\x75\x65\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x29\x3b\x0a\x7d\x0a\x63\x6c\x61\x73\x73\x20\x52\x65\x66\x49\x6d\x70\x6c\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x76\x61\x6c\x75\x65\x2c\x20\x5f\x5f\x76\x5f\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x5f\x76\x5f\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x20\x3d\x20\x5f\x5f\x76\x5f\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x64\x65\x70\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x5f\x76\x5f\x69\x73\x52\x65\x66\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x72\x61\x77\x56\x61\x6c\x75\x65\x20\x3d\x20\x5f\x5f\x76\x5f\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x20\x3f\x20\x76\x61\x6c\x75\x65\x20\x3a\x20\x74\x6f\x52\x61\x77\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x76\x61\x6c\x75\x65\x20\x3d\x20\x5f\x5f\x76\x5f\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x20\x3f\x20\x76\x61\x6c\x75\x65\x20\x3a\x20\x74\x6f\x52\x65\x61\x63\x74\x69\x76\x65\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x67\x65\x74\x20\x76\x61\x6c\x75\x65\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x52\x65\x66\x56\x61\x6c\x75\x65\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x2e\x5f\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x73\x65\x74\x20\x76\x61\x6c\x75\x65\x28\x6e\x65\x77\x56\x61\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x6e\x65\x77\x56\x61\x6c\x20\x3d\x20\x74\x68\x69\x73\x2e\x5f\x5f\x76\x5f\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x20\x3f\x20\x6e\x65\x77\x56\x61\x6c\x20\x3a\x20\x74\x6f\x52\x61\x77\x28\x6e\x65\x77\x56\x61\x6c\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x68\x61\x73\x43\x68\x61\x6e\x67\x65\x64\x28\x6e\x65\x77\x56\x61\x6c\x2c\x20\x74\x68\x69\x73\x2e\x5f\x72\x61\x77\x56\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x72\x61\x77\x56\x61\x6c\x75\x65\x20\x3d\x20\x6e\x65\x77\x56\x61\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x76\x61\x6c\x75\x65\x20\x3d\x20\x74\x68\x69\x73\x2e\x5f\x5f\x76\x5f\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x20\x3f\x20\x6e\x65\x77\x56\x61\x6c\x20\x3a\x20\x74\x6f\x52\x65\x61\x63\x74\x69\x76\x65\x28\x6e\x65\x77\x56\x61\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x52\x65\x66\x56\x61\x6c\x75\x65\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x69\x67\x67\x65\x72\x52\x65\x66\x28\x72\x65\x66\x32\x29\x20\x7b\x0a\x20\x20\x74\x72\x69\x67\x67\x65\x72\x52\x65\x66\x56\x61\x6c\x75\x65\x28\x72\x65\x66\x32\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x75\x6e\x72\x65\x66\x28\x72\x65\x66\x32\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x52\x65\x66\x28\x72\x65\x66\x32\x29\x20\x3f\x20\x72\x65\x66\x32\x2e\x76\x61\x6c\x75\x65\x20\x3a\x20\x72\x65\x66\x32\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x6c\x6c\x6f\x77\x55\x6e\x77\x72\x61\x70\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x7b\x0a\x20\x20\x67\x65\x74\x3a\x20\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x20\x3d\x3e\x20\x75\x6e\x72\x65\x66\x28\x52\x65\x66\x6c\x65\x63\x74\x2e\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x29\x2c\x0a\x20\x20\x73\x65\x74\x3a\x20\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x66\x28\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x20\x26\x26\x20\x21\x69\x73\x52\x65\x66\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x73\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x72\x65\x63\x65\x69\x76\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x72\x6f\x78\x79\x52\x65\x66\x73\x28\x6f\x62\x6a\x65\x63\x74\x57\x69\x74\x68\x52\x65\x66\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x28\x6f\x62\x6a\x65\x63\x74\x57\x69\x74\x68\x52\x65\x66\x73\x29\x20\x3f\x20\x6f\x62\x6a\x65\x63\x74\x57\x69\x74\x68\x52\x65\x66\x73\x20\x3a\x20\x6e\x65\x77\x20\x50\x72\x6f\x78\x79\x28\x6f\x62\x6a\x65\x63\x74\x57\x69\x74\x68\x52\x65\x66\x73\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x55\x6e\x77\x72\x61\x70\x48\x61\x6e\x64\x6c\x65\x72\x73\x29\x3b\x0a\x7d\x0a\x63\x6c\x61\x73\x73\x20\x43\x75\x73\x74\x6f\x6d\x52\x65\x66\x49\x6d\x70\x6c\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x66\x61\x63\x74\x6f\x72\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x64\x65\x70\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x5f\x76\x5f\x69\x73\x52\x65\x66\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x67\x65\x74\x3a\x20\x67\x65\x74\x32\x2c\x20\x73\x65\x74\x3a\x20\x73\x65\x74\x32\x20\x7d\x20\x3d\x20\x66\x61\x63\x74\x6f\x72\x79\x28\x28\x29\x20\x3d\x3e\x20\x74\x72\x61\x63\x6b\x52\x65\x66\x56\x61\x6c\x75\x65\x28\x74\x68\x69\x73\x29\x2c\x20\x28\x29\x20\x3d\x3e\x20\x74\x72\x69\x67\x67\x65\x72\x52\x65\x66\x56\x61\x6c\x75\x65\x28\x74\x68\x69\x73\x29\x29\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x67\x65\x74\x20\x3d\x20\x67\x65\x74\x32\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x73\x65\x74\x20\x3d\x20\x73\x65\x74\x32\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x67\x65\x74\x20\x76\x61\x6c\x75\x65\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x2e\x5f\x67\x65\x74\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x73\x65\x74\x20\x76\x61\x6c\x75\x65\x28\x6e\x65\x77\x56\x61\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x73\x65\x74\x28\x6e\x65\x77\x56\x61\x6c\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x75\x73\x74\x6f\x6d\x52\x65\x66\x28\x66\x61\x63\x74\x6f\x72\x79\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x77\x20\x43\x75\x73\x74\x6f\x6d\x52\x65\x66\x49\x6d\x70\x6c\x28\x66\x61\x63\x74\x6f\x72\x79\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x6f\x52\x65\x66\x73\x28\x6f\x62\x6a\x65\x63\x74\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x74\x20\x3d\x20\x69\x73\x41\x72\x72\x61\x79\x28\x6f\x62\x6a\x65\x63\x74\x29\x20\x3f\x20\x6e\x65\x77\x20\x41\x72\x72\x61\x79\x28\x6f\x62\x6a\x65\x63\x74\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x3a\x20\x7b\x7d\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x6f\x62\x6a\x65\x63\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x74\x6f\x52\x65\x66\x28\x6f\x62\x6a\x65\x63\x74\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x74\x3b\x0a\x7d\x0a\x63\x6c\x61\x73\x73\x20\x4f\x62\x6a\x65\x63\x74\x52\x65\x66\x49\x6d\x70\x6c\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x5f\x6f\x62\x6a\x65\x63\x74\x2c\x20\x5f\x6b\x65\x79\x2c\x20\x5f\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x6f\x62\x6a\x65\x63\x74\x20\x3d\x20\x5f\x6f\x62\x6a\x65\x63\x74\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x6b\x65\x79\x20\x3d\x20\x5f\x6b\x65\x79\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x20\x3d\x20\x5f\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x5f\x76\x5f\x69\x73\x52\x65\x66\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x67\x65\x74\x20\x76\x61\x6c\x75\x65\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x61\x6c\x20\x3d\x20\x74\x68\x69\x73\x2e\x5f\x6f\x62\x6a\x65\x63\x74\x5b\x74\x68\x69\x73\x2e\x5f\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x20\x3d\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x74\x68\x69\x73\x2e\x5f\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x20\x3a\x20\x76\x61\x6c\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x73\x65\x74\x20\x76\x61\x6c\x75\x65\x28\x6e\x65\x77\x56\x61\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x6f\x62\x6a\x65\x63\x74\x5b\x74\x68\x69\x73\x2e\x5f\x6b\x65\x79\x5d\x20\x3d\x20\x6e\x65\x77\x56\x61\x6c\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x6f\x52\x65\x66\x28\x6f\x62\x6a\x65\x63\x74\x2c\x20\x6b\x65\x79\x2c\x20\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x61\x6c\x20\x3d\x20\x6f\x62\x6a\x65\x63\x74\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x52\x65\x66\x28\x76\x61\x6c\x29\x20\x3f\x20\x76\x61\x6c\x20\x3a\x20\x6e\x65\x77\x20\x4f\x62\x6a\x65\x63\x74\x52\x65\x66\x49\x6d\x70\x6c\x28\x6f\x62\x6a\x65\x63\x74\x2c\x20\x6b\x65\x79\x2c\x20\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x29\x3b\x0a\x7d\x0a\x63\x6c\x61\x73\x73\x20\x43\x6f\x6d\x70\x75\x74\x65\x64\x52\x65\x66\x49\x6d\x70\x6c\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x67\x65\x74\x74\x65\x72\x2c\x20\x5f\x73\x65\x74\x74\x65\x72\x2c\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x2c\x20\x69\x73\x53\x53\x52\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x73\x65\x74\x74\x65\x72\x20\x3d\x20\x5f\x73\x65\x74\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x64\x65\x70\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x5f\x76\x5f\x69\x73\x52\x65\x66\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x64\x69\x72\x74\x79\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x65\x66\x66\x65\x63\x74\x20\x3d\x20\x6e\x65\x77\x20\x52\x65\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x28\x67\x65\x74\x74\x65\x72\x2c\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x74\x68\x69\x73\x2e\x5f\x64\x69\x72\x74\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x64\x69\x72\x74\x79\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x52\x65\x66\x56\x61\x6c\x75\x65\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x65\x66\x66\x65\x63\x74\x2e\x63\x6f\x6d\x70\x75\x74\x65\x64\x20\x3d\x20\x74\x68\x69\x73\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x65\x66\x66\x65\x63\x74\x2e\x61\x63\x74\x69\x76\x65\x20\x3d\x20\x74\x68\x69\x73\x2e\x5f\x63\x61\x63\x68\x65\x61\x62\x6c\x65\x20\x3d\x20\x21\x69\x73\x53\x53\x52\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x5b\x22\x5f\x5f\x76\x5f\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x22\x5d\x20\x3d\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x32\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x67\x65\x74\x20\x76\x61\x6c\x75\x65\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x6c\x66\x32\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x52\x65\x66\x56\x61\x6c\x75\x65\x28\x73\x65\x6c\x66\x32\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x65\x6c\x66\x32\x2e\x5f\x64\x69\x72\x74\x79\x20\x7c\x7c\x20\x21\x73\x65\x6c\x66\x32\x2e\x5f\x63\x61\x63\x68\x65\x61\x62\x6c\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x6c\x66\x32\x2e\x5f\x64\x69\x72\x74\x79\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x6c\x66\x32\x2e\x5f\x76\x61\x6c\x75\x65\x20\x3d\x20\x73\x65\x6c\x66\x32\x2e\x65\x66\x66\x65\x63\x74\x2e\x72\x75\x6e\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x65\x6c\x66\x32\x2e\x5f\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x73\x65\x74\x20\x76\x61\x6c\x75\x65\x28\x6e\x65\x77\x56\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x73\x65\x74\x74\x65\x72\x28\x6e\x65\x77\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x6f\x6d\x70\x75\x74\x65\x64\x24\x31\x28\x67\x65\x74\x74\x65\x72\x4f\x72\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x64\x65\x62\x75\x67\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x69\x73\x53\x53\x52\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x67\x65\x74\x74\x65\x72\x3b\x0a\x20\x20\x6c\x65\x74\x20\x73\x65\x74\x74\x65\x72\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x6c\x79\x47\x65\x74\x74\x65\x72\x20\x3d\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x67\x65\x74\x74\x65\x72\x4f\x72\x4f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x6f\x6e\x6c\x79\x47\x65\x74\x74\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x67\x65\x74\x74\x65\x72\x4f\x72\x4f\x70\x74\x69\x6f\x6e\x73\x3b\x0a\x20\x20\x20\x20\x73\x65\x74\x74\x65\x72\x20\x3d\x20\x4e\x4f\x4f\x50\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x67\x65\x74\x74\x65\x72\x4f\x72\x4f\x70\x74\x69\x6f\x6e\x73\x2e\x67\x65\x74\x3b\x0a\x20\x20\x20\x20\x73\x65\x74\x74\x65\x72\x20\x3d\x20\x67\x65\x74\x74\x65\x72\x4f\x72\x4f\x70\x74\x69\x6f\x6e\x73\x2e\x73\x65\x74\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x52\x65\x66\x20\x3d\x20\x6e\x65\x77\x20\x43\x6f\x6d\x70\x75\x74\x65\x64\x52\x65\x66\x49\x6d\x70\x6c\x28\x67\x65\x74\x74\x65\x72\x2c\x20\x73\x65\x74\x74\x65\x72\x2c\x20\x6f\x6e\x6c\x79\x47\x65\x74\x74\x65\x72\x20\x7c\x7c\x20\x21\x73\x65\x74\x74\x65\x72\x2c\x20\x69\x73\x53\x53\x52\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x52\x65\x66\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x73\x74\x61\x63\x6b\x20\x3d\x20\x5b\x5d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x61\x72\x6e\x24\x31\x28\x6d\x73\x67\x2c\x20\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x7b\x0a\x20\x20\x70\x61\x75\x73\x65\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x73\x74\x61\x63\x6b\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3f\x20\x73\x74\x61\x63\x6b\x5b\x73\x74\x61\x63\x6b\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2d\x20\x31\x5d\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3a\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x70\x70\x57\x61\x72\x6e\x48\x61\x6e\x64\x6c\x65\x72\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x77\x61\x72\x6e\x48\x61\x6e\x64\x6c\x65\x72\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x72\x61\x63\x65\x20\x3d\x20\x67\x65\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x54\x72\x61\x63\x65\x28\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x61\x70\x70\x57\x61\x72\x6e\x48\x61\x6e\x64\x6c\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x61\x70\x70\x57\x61\x72\x6e\x48\x61\x6e\x64\x6c\x65\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x31\x31\x2c\x20\x5b\x0a\x20\x20\x20\x20\x20\x20\x6d\x73\x67\x20\x2b\x20\x61\x72\x67\x73\x2e\x6a\x6f\x69\x6e\x28\x22\x22\x29\x2c\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x78\x79\x2c\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x65\x2e\x6d\x61\x70\x28\x28\x7b\x20\x76\x6e\x6f\x64\x65\x20\x7d\x29\x20\x3d\x3e\x20\x60\x61\x74\x20\x3c\x24\x7b\x66\x6f\x72\x6d\x61\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4e\x61\x6d\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x29\x7d\x3e\x60\x29\x2e\x6a\x6f\x69\x6e\x28\x22\x5c\x6e\x22\x29\x2c\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x65\x0a\x20\x20\x20\x20\x5d\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x77\x61\x72\x6e\x41\x72\x67\x73\x20\x3d\x20\x5b\x60\x5b\x56\x75\x65\x20\x77\x61\x72\x6e\x5d\x3a\x20\x24\x7b\x6d\x73\x67\x7d\x60\x2c\x20\x2e\x2e\x2e\x61\x72\x67\x73\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x61\x63\x65\x2e\x6c\x65\x6e\x67\x74\x68\x20\x26\x26\x20\x74\x72\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x77\x61\x72\x6e\x41\x72\x67\x73\x2e\x70\x75\x73\x68\x28\x60\x0a\x60\x2c\x20\x2e\x2e\x2e\x66\x6f\x72\x6d\x61\x74\x54\x72\x61\x63\x65\x28\x74\x72\x61\x63\x65\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x6f\x6c\x65\x2e\x77\x61\x72\x6e\x28\x2e\x2e\x2e\x77\x61\x72\x6e\x41\x72\x67\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x73\x65\x74\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x54\x72\x61\x63\x65\x28\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x20\x3d\x20\x73\x74\x61\x63\x6b\x5b\x73\x74\x61\x63\x6b\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2d\x20\x31\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x63\x75\x72\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5b\x5d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x53\x74\x61\x63\x6b\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x63\x75\x72\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x61\x73\x74\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x53\x74\x61\x63\x6b\x5b\x30\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6c\x61\x73\x74\x20\x26\x26\x20\x6c\x61\x73\x74\x2e\x76\x6e\x6f\x64\x65\x20\x3d\x3d\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6c\x61\x73\x74\x2e\x72\x65\x63\x75\x72\x73\x65\x43\x6f\x75\x6e\x74\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x53\x74\x61\x63\x6b\x2e\x70\x75\x73\x68\x28\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x3a\x20\x63\x75\x72\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x63\x75\x72\x73\x65\x43\x6f\x75\x6e\x74\x3a\x20\x30\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x26\x26\x20\x63\x75\x72\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x26\x26\x20\x70\x61\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x53\x74\x61\x63\x6b\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6f\x72\x6d\x61\x74\x54\x72\x61\x63\x65\x28\x74\x72\x61\x63\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x6f\x67\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x74\x72\x61\x63\x65\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x65\x6e\x74\x72\x79\x2c\x20\x69\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6c\x6f\x67\x73\x2e\x70\x75\x73\x68\x28\x2e\x2e\x2e\x69\x20\x3d\x3d\x3d\x20\x30\x20\x3f\x20\x5b\x5d\x20\x3a\x20\x5b\x60\x0a\x60\x5d\x2c\x20\x2e\x2e\x2e\x66\x6f\x72\x6d\x61\x74\x54\x72\x61\x63\x65\x45\x6e\x74\x72\x79\x28\x65\x6e\x74\x72\x79\x29\x29\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6c\x6f\x67\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6f\x72\x6d\x61\x74\x54\x72\x61\x63\x65\x45\x6e\x74\x72\x79\x28\x7b\x20\x76\x6e\x6f\x64\x65\x2c\x20\x72\x65\x63\x75\x72\x73\x65\x43\x6f\x75\x6e\x74\x20\x7d\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x6f\x73\x74\x66\x69\x78\x20\x3d\x20\x72\x65\x63\x75\x72\x73\x65\x43\x6f\x75\x6e\x74\x20\x3e\x20\x30\x20\x3f\x20\x60\x2e\x2e\x2e\x20\x28\x24\x7b\x72\x65\x63\x75\x72\x73\x65\x43\x6f\x75\x6e\x74\x7d\x20\x72\x65\x63\x75\x72\x73\x69\x76\x65\x20\x63\x61\x6c\x6c\x73\x29\x60\x20\x3a\x20\x60\x60\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x52\x6f\x6f\x74\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3f\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x70\x61\x72\x65\x6e\x74\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3a\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x70\x65\x6e\x20\x3d\x20\x60\x20\x61\x74\x20\x3c\x24\x7b\x66\x6f\x72\x6d\x61\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4e\x61\x6d\x65\x28\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2c\x20\x69\x73\x52\x6f\x6f\x74\x29\x7d\x60\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6c\x6f\x73\x65\x20\x3d\x20\x60\x3e\x60\x20\x2b\x20\x70\x6f\x73\x74\x66\x69\x78\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x3f\x20\x5b\x6f\x70\x65\x6e\x2c\x20\x2e\x2e\x2e\x66\x6f\x72\x6d\x61\x74\x50\x72\x6f\x70\x73\x28\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x29\x2c\x20\x63\x6c\x6f\x73\x65\x5d\x20\x3a\x20\x5b\x6f\x70\x65\x6e\x20\x2b\x20\x63\x6c\x6f\x73\x65\x5d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6f\x72\x6d\x61\x74\x50\x72\x6f\x70\x73\x28\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x73\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x6b\x65\x79\x73\x2e\x73\x6c\x69\x63\x65\x28\x30\x2c\x20\x33\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x73\x2e\x70\x75\x73\x68\x28\x2e\x2e\x2e\x66\x6f\x72\x6d\x61\x74\x50\x72\x6f\x70\x28\x6b\x65\x79\x2c\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x29\x29\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x73\x2e\x70\x75\x73\x68\x28\x60\x20\x2e\x2e\x2e\x60\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6f\x72\x6d\x61\x74\x50\x72\x6f\x70\x28\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x72\x61\x77\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x4a\x53\x4f\x4e\x2e\x73\x74\x72\x69\x6e\x67\x69\x66\x79\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x20\x3f\x20\x76\x61\x6c\x75\x65\x20\x3a\x20\x5b\x60\x24\x7b\x6b\x65\x79\x7d\x3d\x24\x7b\x76\x61\x6c\x75\x65\x7d\x60\x5d\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x3d\x20\x22\x6e\x75\x6d\x62\x65\x72\x22\x20\x7c\x7c\x20\x74\x79\x70\x65\x6f\x66\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x3d\x20\x22\x62\x6f\x6f\x6c\x65\x61\x6e\x22\x20\x7c\x7c\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x20\x3f\x20\x76\x61\x6c\x75\x65\x20\x3a\x20\x5b\x60\x24\x7b\x6b\x65\x79\x7d\x3d\x24\x7b\x76\x61\x6c\x75\x65\x7d\x60\x5d\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x52\x65\x66\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x66\x6f\x72\x6d\x61\x74\x50\x72\x6f\x70\x28\x6b\x65\x79\x2c\x20\x74\x6f\x52\x61\x77\x28\x76\x61\x6c\x75\x65\x2e\x76\x61\x6c\x75\x65\x29\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x20\x3f\x20\x76\x61\x6c\x75\x65\x20\x3a\x20\x5b\x60\x24\x7b\x6b\x65\x79\x7d\x3d\x52\x65\x66\x3c\x60\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x60\x3e\x60\x5d\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5b\x60\x24\x7b\x6b\x65\x79\x7d\x3d\x66\x6e\x24\x7b\x76\x61\x6c\x75\x65\x2e\x6e\x61\x6d\x65\x20\x3f\x20\x60\x3c\x24\x7b\x76\x61\x6c\x75\x65\x2e\x6e\x61\x6d\x65\x7d\x3e\x60\x20\x3a\x20\x60\x60\x7d\x60\x5d\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x20\x3f\x20\x76\x61\x6c\x75\x65\x20\x3a\x20\x5b\x60\x24\x7b\x6b\x65\x79\x7d\x3d\x60\x2c\x20\x76\x61\x6c\x75\x65\x5d\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x66\x6e\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x79\x70\x65\x2c\x20\x61\x72\x67\x73\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x72\x65\x73\x3b\x0a\x20\x20\x74\x72\x79\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x73\x20\x3d\x20\x61\x72\x67\x73\x20\x3f\x20\x66\x6e\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x3a\x20\x66\x6e\x28\x29\x3b\x0a\x20\x20\x7d\x20\x63\x61\x74\x63\x68\x20\x28\x65\x72\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x68\x61\x6e\x64\x6c\x65\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x79\x70\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x66\x6e\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x79\x70\x65\x2c\x20\x61\x72\x67\x73\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x66\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x66\x6e\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x79\x70\x65\x2c\x20\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x72\x65\x73\x20\x26\x26\x20\x69\x73\x50\x72\x6f\x6d\x69\x73\x65\x28\x72\x65\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x2e\x63\x61\x74\x63\x68\x28\x28\x65\x72\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x6e\x64\x6c\x65\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x79\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x61\x6c\x75\x65\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x66\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x73\x2e\x70\x75\x73\x68\x28\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x66\x6e\x5b\x69\x5d\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x79\x70\x65\x2c\x20\x61\x72\x67\x73\x29\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x68\x61\x6e\x64\x6c\x65\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x79\x70\x65\x2c\x20\x74\x68\x72\x6f\x77\x49\x6e\x44\x65\x76\x20\x3d\x20\x74\x72\x75\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6e\x74\x65\x78\x74\x56\x4e\x6f\x64\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3f\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x20\x3a\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x75\x72\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x78\x70\x6f\x73\x65\x64\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x78\x79\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x72\x72\x6f\x72\x49\x6e\x66\x6f\x20\x3d\x20\x74\x79\x70\x65\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x63\x75\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x72\x72\x6f\x72\x43\x61\x70\x74\x75\x72\x65\x64\x48\x6f\x6f\x6b\x73\x20\x3d\x20\x63\x75\x72\x2e\x65\x63\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x72\x72\x6f\x72\x43\x61\x70\x74\x75\x72\x65\x64\x48\x6f\x6f\x6b\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x65\x72\x72\x6f\x72\x43\x61\x70\x74\x75\x72\x65\x64\x48\x6f\x6f\x6b\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x72\x72\x6f\x72\x43\x61\x70\x74\x75\x72\x65\x64\x48\x6f\x6f\x6b\x73\x5b\x69\x5d\x28\x65\x72\x72\x2c\x20\x65\x78\x70\x6f\x73\x65\x64\x49\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x65\x72\x72\x6f\x72\x49\x6e\x66\x6f\x29\x20\x3d\x3d\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x75\x72\x20\x3d\x20\x63\x75\x72\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x70\x70\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x65\x72\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x65\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x65\x72\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x61\x70\x70\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x61\x70\x70\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x31\x30\x2c\x20\x5b\x65\x72\x72\x2c\x20\x65\x78\x70\x6f\x73\x65\x64\x49\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x65\x72\x72\x6f\x72\x49\x6e\x66\x6f\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x6c\x6f\x67\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x2c\x20\x74\x79\x70\x65\x2c\x20\x63\x6f\x6e\x74\x65\x78\x74\x56\x4e\x6f\x64\x65\x2c\x20\x74\x68\x72\x6f\x77\x49\x6e\x44\x65\x76\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6c\x6f\x67\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x2c\x20\x74\x79\x70\x65\x2c\x20\x63\x6f\x6e\x74\x65\x78\x74\x56\x4e\x6f\x64\x65\x2c\x20\x74\x68\x72\x6f\x77\x49\x6e\x44\x65\x76\x20\x3d\x20\x74\x72\x75\x65\x29\x20\x7b\x0a\x20\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x6f\x6c\x65\x2e\x65\x72\x72\x6f\x72\x28\x65\x72\x72\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x6c\x65\x74\x20\x69\x73\x46\x6c\x75\x73\x68\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x6c\x65\x74\x20\x69\x73\x46\x6c\x75\x73\x68\x50\x65\x6e\x64\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x71\x75\x65\x75\x65\x20\x3d\x20\x5b\x5d\x3b\x0a\x6c\x65\x74\x20\x66\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3d\x20\x30\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x70\x65\x6e\x64\x69\x6e\x67\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x6c\x65\x74\x20\x61\x63\x74\x69\x76\x65\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x6c\x65\x74\x20\x70\x72\x65\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3d\x20\x30\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x70\x65\x6e\x64\x69\x6e\x67\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x6c\x65\x74\x20\x61\x63\x74\x69\x76\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x6c\x65\x74\x20\x70\x6f\x73\x74\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3d\x20\x30\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x50\x72\x6f\x6d\x69\x73\x65\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x50\x72\x6f\x6d\x69\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x29\x3b\x0a\x6c\x65\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x46\x6c\x75\x73\x68\x50\x72\x6f\x6d\x69\x73\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x6c\x65\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x50\x72\x65\x46\x6c\x75\x73\x68\x50\x61\x72\x65\x6e\x74\x4a\x6f\x62\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x65\x78\x74\x54\x69\x63\x6b\x28\x66\x6e\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x32\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x46\x6c\x75\x73\x68\x50\x72\x6f\x6d\x69\x73\x65\x20\x7c\x7c\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x50\x72\x6f\x6d\x69\x73\x65\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x6e\x20\x3f\x20\x70\x32\x2e\x74\x68\x65\x6e\x28\x74\x68\x69\x73\x20\x3f\x20\x66\x6e\x2e\x62\x69\x6e\x64\x28\x74\x68\x69\x73\x29\x20\x3a\x20\x66\x6e\x29\x20\x3a\x20\x70\x32\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x69\x6e\x64\x49\x6e\x73\x65\x72\x74\x69\x6f\x6e\x49\x6e\x64\x65\x78\x28\x69\x64\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x73\x74\x61\x72\x74\x20\x3d\x20\x66\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x2b\x20\x31\x3b\x0a\x20\x20\x6c\x65\x74\x20\x65\x6e\x64\x20\x3d\x20\x71\x75\x65\x75\x65\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x73\x74\x61\x72\x74\x20\x3c\x20\x65\x6e\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x69\x64\x64\x6c\x65\x20\x3d\x20\x73\x74\x61\x72\x74\x20\x2b\x20\x65\x6e\x64\x20\x3e\x3e\x3e\x20\x31\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x69\x64\x64\x6c\x65\x4a\x6f\x62\x49\x64\x20\x3d\x20\x67\x65\x74\x49\x64\x28\x71\x75\x65\x75\x65\x5b\x6d\x69\x64\x64\x6c\x65\x5d\x29\x3b\x0a\x20\x20\x20\x20\x6d\x69\x64\x64\x6c\x65\x4a\x6f\x62\x49\x64\x20\x3c\x20\x69\x64\x20\x3f\x20\x73\x74\x61\x72\x74\x20\x3d\x20\x6d\x69\x64\x64\x6c\x65\x20\x2b\x20\x31\x20\x3a\x20\x65\x6e\x64\x20\x3d\x20\x6d\x69\x64\x64\x6c\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x74\x61\x72\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x71\x75\x65\x75\x65\x4a\x6f\x62\x28\x6a\x6f\x62\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x28\x21\x71\x75\x65\x75\x65\x2e\x6c\x65\x6e\x67\x74\x68\x20\x7c\x7c\x20\x21\x71\x75\x65\x75\x65\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x6a\x6f\x62\x2c\x20\x69\x73\x46\x6c\x75\x73\x68\x69\x6e\x67\x20\x26\x26\x20\x6a\x6f\x62\x2e\x61\x6c\x6c\x6f\x77\x52\x65\x63\x75\x72\x73\x65\x20\x3f\x20\x66\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x2b\x20\x31\x20\x3a\x20\x66\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x29\x29\x20\x26\x26\x20\x6a\x6f\x62\x20\x21\x3d\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x50\x72\x65\x46\x6c\x75\x73\x68\x50\x61\x72\x65\x6e\x74\x4a\x6f\x62\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6a\x6f\x62\x2e\x69\x64\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x2e\x70\x75\x73\x68\x28\x6a\x6f\x62\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x2e\x73\x70\x6c\x69\x63\x65\x28\x66\x69\x6e\x64\x49\x6e\x73\x65\x72\x74\x69\x6f\x6e\x49\x6e\x64\x65\x78\x28\x6a\x6f\x62\x2e\x69\x64\x29\x2c\x20\x30\x2c\x20\x6a\x6f\x62\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x71\x75\x65\x75\x65\x46\x6c\x75\x73\x68\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x71\x75\x65\x75\x65\x46\x6c\x75\x73\x68\x28\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x46\x6c\x75\x73\x68\x69\x6e\x67\x20\x26\x26\x20\x21\x69\x73\x46\x6c\x75\x73\x68\x50\x65\x6e\x64\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x73\x46\x6c\x75\x73\x68\x50\x65\x6e\x64\x69\x6e\x67\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x46\x6c\x75\x73\x68\x50\x72\x6f\x6d\x69\x73\x65\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x50\x72\x6f\x6d\x69\x73\x65\x2e\x74\x68\x65\x6e\x28\x66\x6c\x75\x73\x68\x4a\x6f\x62\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x76\x61\x6c\x69\x64\x61\x74\x65\x4a\x6f\x62\x28\x6a\x6f\x62\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x20\x3d\x20\x71\x75\x65\x75\x65\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x6a\x6f\x62\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x20\x3e\x20\x66\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x29\x20\x7b\x0a\x20\x20\x20\x20\x71\x75\x65\x75\x65\x2e\x73\x70\x6c\x69\x63\x65\x28\x69\x2c\x20\x31\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x71\x75\x65\x75\x65\x43\x62\x28\x63\x62\x2c\x20\x61\x63\x74\x69\x76\x65\x51\x75\x65\x75\x65\x2c\x20\x70\x65\x6e\x64\x69\x6e\x67\x51\x75\x65\x75\x65\x2c\x20\x69\x6e\x64\x65\x78\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x41\x72\x72\x61\x79\x28\x63\x62\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x61\x63\x74\x69\x76\x65\x51\x75\x65\x75\x65\x20\x7c\x7c\x20\x21\x61\x63\x74\x69\x76\x65\x51\x75\x65\x75\x65\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x63\x62\x2c\x20\x63\x62\x2e\x61\x6c\x6c\x6f\x77\x52\x65\x63\x75\x72\x73\x65\x20\x3f\x20\x69\x6e\x64\x65\x78\x20\x2b\x20\x31\x20\x3a\x20\x69\x6e\x64\x65\x78\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x65\x6e\x64\x69\x6e\x67\x51\x75\x65\x75\x65\x2e\x70\x75\x73\x68\x28\x63\x62\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x70\x65\x6e\x64\x69\x6e\x67\x51\x75\x65\x75\x65\x2e\x70\x75\x73\x68\x28\x2e\x2e\x2e\x63\x62\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x71\x75\x65\x75\x65\x46\x6c\x75\x73\x68\x28\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x71\x75\x65\x75\x65\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x28\x63\x62\x29\x20\x7b\x0a\x20\x20\x71\x75\x65\x75\x65\x43\x62\x28\x63\x62\x2c\x20\x61\x63\x74\x69\x76\x65\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x2c\x20\x70\x65\x6e\x64\x69\x6e\x67\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x2c\x20\x70\x72\x65\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x28\x63\x62\x29\x20\x7b\x0a\x20\x20\x71\x75\x65\x75\x65\x43\x62\x28\x63\x62\x2c\x20\x61\x63\x74\x69\x76\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x2c\x20\x70\x65\x6e\x64\x69\x6e\x67\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x2c\x20\x70\x6f\x73\x74\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6c\x75\x73\x68\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x28\x73\x65\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x4a\x6f\x62\x20\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x70\x65\x6e\x64\x69\x6e\x67\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x50\x72\x65\x46\x6c\x75\x73\x68\x50\x61\x72\x65\x6e\x74\x4a\x6f\x62\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x4a\x6f\x62\x3b\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x20\x3d\x20\x5b\x2e\x2e\x2e\x6e\x65\x77\x20\x53\x65\x74\x28\x70\x65\x6e\x64\x69\x6e\x67\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x29\x5d\x3b\x0a\x20\x20\x20\x20\x70\x65\x6e\x64\x69\x6e\x67\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x70\x72\x65\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3d\x20\x30\x3b\x20\x70\x72\x65\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3c\x20\x61\x63\x74\x69\x76\x65\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x70\x72\x65\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x5b\x70\x72\x65\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x5d\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x70\x72\x65\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x50\x72\x65\x46\x6c\x75\x73\x68\x50\x61\x72\x65\x6e\x74\x4a\x6f\x62\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x66\x6c\x75\x73\x68\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x28\x73\x65\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x4a\x6f\x62\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6c\x75\x73\x68\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x28\x73\x65\x65\x6e\x29\x20\x7b\x0a\x20\x20\x66\x6c\x75\x73\x68\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x28\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x70\x65\x6e\x64\x69\x6e\x67\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x65\x64\x75\x70\x65\x64\x20\x3d\x20\x5b\x2e\x2e\x2e\x6e\x65\x77\x20\x53\x65\x74\x28\x70\x65\x6e\x64\x69\x6e\x67\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x29\x5d\x3b\x0a\x20\x20\x20\x20\x70\x65\x6e\x64\x69\x6e\x67\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x61\x63\x74\x69\x76\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x2e\x70\x75\x73\x68\x28\x2e\x2e\x2e\x64\x65\x64\x75\x70\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x20\x3d\x20\x64\x65\x64\x75\x70\x65\x64\x3b\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x2e\x73\x6f\x72\x74\x28\x28\x61\x2c\x20\x62\x29\x20\x3d\x3e\x20\x67\x65\x74\x49\x64\x28\x61\x29\x20\x2d\x20\x67\x65\x74\x49\x64\x28\x62\x29\x29\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x70\x6f\x73\x74\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3d\x20\x30\x3b\x20\x70\x6f\x73\x74\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3c\x20\x61\x63\x74\x69\x76\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x70\x6f\x73\x74\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x5b\x70\x6f\x73\x74\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x5d\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x70\x6f\x73\x74\x46\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3d\x20\x30\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x49\x64\x20\x3d\x20\x28\x6a\x6f\x62\x29\x20\x3d\x3e\x20\x6a\x6f\x62\x2e\x69\x64\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x49\x6e\x66\x69\x6e\x69\x74\x79\x20\x3a\x20\x6a\x6f\x62\x2e\x69\x64\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6c\x75\x73\x68\x4a\x6f\x62\x73\x28\x73\x65\x65\x6e\x29\x20\x7b\x0a\x20\x20\x69\x73\x46\x6c\x75\x73\x68\x50\x65\x6e\x64\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x69\x73\x46\x6c\x75\x73\x68\x69\x6e\x67\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x66\x6c\x75\x73\x68\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x28\x73\x65\x65\x6e\x29\x3b\x0a\x20\x20\x71\x75\x65\x75\x65\x2e\x73\x6f\x72\x74\x28\x28\x61\x2c\x20\x62\x29\x20\x3d\x3e\x20\x67\x65\x74\x49\x64\x28\x61\x29\x20\x2d\x20\x67\x65\x74\x49\x64\x28\x62\x29\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x65\x63\x6b\x20\x3d\x20\x4e\x4f\x4f\x50\x3b\x0a\x20\x20\x74\x72\x79\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x66\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3d\x20\x30\x3b\x20\x66\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3c\x20\x71\x75\x65\x75\x65\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x66\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6a\x6f\x62\x20\x3d\x20\x71\x75\x65\x75\x65\x5b\x66\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6a\x6f\x62\x20\x26\x26\x20\x6a\x6f\x62\x2e\x61\x63\x74\x69\x76\x65\x20\x21\x3d\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x66\x61\x6c\x73\x65\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x6a\x6f\x62\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x31\x34\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x66\x69\x6e\x61\x6c\x6c\x79\x20\x7b\x0a\x20\x20\x20\x20\x66\x6c\x75\x73\x68\x49\x6e\x64\x65\x78\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x71\x75\x65\x75\x65\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x66\x6c\x75\x73\x68\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x28\x29\x3b\x0a\x20\x20\x20\x20\x69\x73\x46\x6c\x75\x73\x68\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x46\x6c\x75\x73\x68\x50\x72\x6f\x6d\x69\x73\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x71\x75\x65\x75\x65\x2e\x6c\x65\x6e\x67\x74\x68\x20\x7c\x7c\x20\x70\x65\x6e\x64\x69\x6e\x67\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x7c\x7c\x20\x70\x65\x6e\x64\x69\x6e\x67\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6c\x75\x73\x68\x4a\x6f\x62\x73\x28\x73\x65\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x6c\x65\x74\x20\x64\x65\x76\x74\x6f\x6f\x6c\x73\x3b\x0a\x6c\x65\x74\x20\x62\x75\x66\x66\x65\x72\x20\x3d\x20\x5b\x5d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x44\x65\x76\x74\x6f\x6f\x6c\x73\x48\x6f\x6f\x6b\x28\x68\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x76\x61\x72\x20\x5f\x61\x2c\x20\x5f\x62\x3b\x0a\x20\x20\x64\x65\x76\x74\x6f\x6f\x6c\x73\x20\x3d\x20\x68\x6f\x6f\x6b\x3b\x0a\x20\x20\x69\x66\x20\x28\x64\x65\x76\x74\x6f\x6f\x6c\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x64\x65\x76\x74\x6f\x6f\x6c\x73\x2e\x65\x6e\x61\x62\x6c\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x62\x75\x66\x66\x65\x72\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x7b\x20\x65\x76\x65\x6e\x74\x2c\x20\x61\x72\x67\x73\x20\x7d\x29\x20\x3d\x3e\x20\x64\x65\x76\x74\x6f\x6f\x6c\x73\x2e\x65\x6d\x69\x74\x28\x65\x76\x65\x6e\x74\x2c\x20\x2e\x2e\x2e\x61\x72\x67\x73\x29\x29\x3b\x0a\x20\x20\x20\x20\x62\x75\x66\x66\x65\x72\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x77\x69\x6e\x64\x6f\x77\x20\x21\x3d\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x26\x26\x20\x77\x69\x6e\x64\x6f\x77\x2e\x48\x54\x4d\x4c\x45\x6c\x65\x6d\x65\x6e\x74\x20\x26\x26\x20\x21\x28\x28\x5f\x62\x20\x3d\x20\x28\x5f\x61\x20\x3d\x20\x77\x69\x6e\x64\x6f\x77\x2e\x6e\x61\x76\x69\x67\x61\x74\x6f\x72\x29\x20\x3d\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x7c\x7c\x20\x5f\x61\x20\x3d\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x76\x6f\x69\x64\x20\x30\x20\x3a\x20\x5f\x61\x2e\x75\x73\x65\x72\x41\x67\x65\x6e\x74\x29\x20\x3d\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x7c\x7c\x20\x5f\x62\x20\x3d\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x76\x6f\x69\x64\x20\x30\x20\x3a\x20\x5f\x62\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x22\x6a\x73\x64\x6f\x6d\x22\x29\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x70\x6c\x61\x79\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x2e\x5f\x5f\x56\x55\x45\x5f\x44\x45\x56\x54\x4f\x4f\x4c\x53\x5f\x48\x4f\x4f\x4b\x5f\x52\x45\x50\x4c\x41\x59\x5f\x5f\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x2e\x5f\x5f\x56\x55\x45\x5f\x44\x45\x56\x54\x4f\x4f\x4c\x53\x5f\x48\x4f\x4f\x4b\x5f\x52\x45\x50\x4c\x41\x59\x5f\x5f\x20\x7c\x7c\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x72\x65\x70\x6c\x61\x79\x2e\x70\x75\x73\x68\x28\x28\x6e\x65\x77\x48\x6f\x6f\x6b\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x44\x65\x76\x74\x6f\x6f\x6c\x73\x48\x6f\x6f\x6b\x28\x6e\x65\x77\x48\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x73\x65\x74\x54\x69\x6d\x65\x6f\x75\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x64\x65\x76\x74\x6f\x6f\x6c\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x2e\x5f\x5f\x56\x55\x45\x5f\x44\x45\x56\x54\x4f\x4f\x4c\x53\x5f\x48\x4f\x4f\x4b\x5f\x52\x45\x50\x4c\x41\x59\x5f\x5f\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x75\x66\x66\x65\x72\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x2c\x20\x33\x65\x33\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x62\x75\x66\x66\x65\x72\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x65\x6d\x69\x74\x24\x31\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x65\x76\x65\x6e\x74\x2c\x20\x2e\x2e\x2e\x72\x61\x77\x41\x72\x67\x73\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x70\x73\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x7c\x7c\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x3b\x0a\x20\x20\x6c\x65\x74\x20\x61\x72\x67\x73\x20\x3d\x20\x72\x61\x77\x41\x72\x67\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x4d\x6f\x64\x65\x6c\x4c\x69\x73\x74\x65\x6e\x65\x72\x32\x20\x3d\x20\x65\x76\x65\x6e\x74\x2e\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68\x28\x22\x75\x70\x64\x61\x74\x65\x3a\x22\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x64\x65\x6c\x41\x72\x67\x20\x3d\x20\x69\x73\x4d\x6f\x64\x65\x6c\x4c\x69\x73\x74\x65\x6e\x65\x72\x32\x20\x26\x26\x20\x65\x76\x65\x6e\x74\x2e\x73\x6c\x69\x63\x65\x28\x37\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x6d\x6f\x64\x65\x6c\x41\x72\x67\x20\x26\x26\x20\x6d\x6f\x64\x65\x6c\x41\x72\x67\x20\x69\x6e\x20\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x4b\x65\x79\x20\x3d\x20\x60\x24\x7b\x6d\x6f\x64\x65\x6c\x41\x72\x67\x20\x3d\x3d\x3d\x20\x22\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x22\x20\x3f\x20\x22\x6d\x6f\x64\x65\x6c\x22\x20\x3a\x20\x6d\x6f\x64\x65\x6c\x41\x72\x67\x7d\x4d\x6f\x64\x69\x66\x69\x65\x72\x73\x60\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6e\x75\x6d\x62\x65\x72\x2c\x20\x74\x72\x69\x6d\x20\x7d\x20\x3d\x20\x70\x72\x6f\x70\x73\x5b\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x4b\x65\x79\x5d\x20\x7c\x7c\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x69\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x72\x67\x73\x20\x3d\x20\x72\x61\x77\x41\x72\x67\x73\x2e\x6d\x61\x70\x28\x28\x61\x29\x20\x3d\x3e\x20\x61\x2e\x74\x72\x69\x6d\x28\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x75\x6d\x62\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x72\x67\x73\x20\x3d\x20\x72\x61\x77\x41\x72\x67\x73\x2e\x6d\x61\x70\x28\x74\x6f\x4e\x75\x6d\x62\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x6c\x65\x74\x20\x68\x61\x6e\x64\x6c\x65\x72\x4e\x61\x6d\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x68\x61\x6e\x64\x6c\x65\x72\x20\x3d\x20\x70\x72\x6f\x70\x73\x5b\x68\x61\x6e\x64\x6c\x65\x72\x4e\x61\x6d\x65\x20\x3d\x20\x74\x6f\x48\x61\x6e\x64\x6c\x65\x72\x4b\x65\x79\x28\x65\x76\x65\x6e\x74\x29\x5d\x20\x7c\x7c\x20\x70\x72\x6f\x70\x73\x5b\x68\x61\x6e\x64\x6c\x65\x72\x4e\x61\x6d\x65\x20\x3d\x20\x74\x6f\x48\x61\x6e\x64\x6c\x65\x72\x4b\x65\x79\x28\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x65\x76\x65\x6e\x74\x29\x29\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x68\x61\x6e\x64\x6c\x65\x72\x20\x26\x26\x20\x69\x73\x4d\x6f\x64\x65\x6c\x4c\x69\x73\x74\x65\x6e\x65\x72\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x68\x61\x6e\x64\x6c\x65\x72\x20\x3d\x20\x70\x72\x6f\x70\x73\x5b\x68\x61\x6e\x64\x6c\x65\x72\x4e\x61\x6d\x65\x20\x3d\x20\x74\x6f\x48\x61\x6e\x64\x6c\x65\x72\x4b\x65\x79\x28\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x28\x65\x76\x65\x6e\x74\x29\x29\x5d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x68\x61\x6e\x64\x6c\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x68\x61\x6e\x64\x6c\x65\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x36\x2c\x20\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x63\x65\x48\x61\x6e\x64\x6c\x65\x72\x20\x3d\x20\x70\x72\x6f\x70\x73\x5b\x68\x61\x6e\x64\x6c\x65\x72\x4e\x61\x6d\x65\x20\x2b\x20\x60\x4f\x6e\x63\x65\x60\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x6f\x6e\x63\x65\x48\x61\x6e\x64\x6c\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x6d\x69\x74\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x6d\x69\x74\x74\x65\x64\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x6d\x69\x74\x74\x65\x64\x5b\x68\x61\x6e\x64\x6c\x65\x72\x4e\x61\x6d\x65\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x6d\x69\x74\x74\x65\x64\x5b\x68\x61\x6e\x64\x6c\x65\x72\x4e\x61\x6d\x65\x5d\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x6f\x6e\x63\x65\x48\x61\x6e\x64\x6c\x65\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x36\x2c\x20\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x45\x6d\x69\x74\x73\x4f\x70\x74\x69\x6f\x6e\x73\x28\x63\x6f\x6d\x70\x2c\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2c\x20\x61\x73\x4d\x69\x78\x69\x6e\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x20\x3d\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x65\x6d\x69\x74\x73\x43\x61\x63\x68\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x64\x20\x3d\x20\x63\x61\x63\x68\x65\x2e\x67\x65\x74\x28\x63\x6f\x6d\x70\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x63\x61\x63\x68\x65\x64\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x61\x63\x68\x65\x64\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x20\x3d\x20\x63\x6f\x6d\x70\x2e\x65\x6d\x69\x74\x73\x3b\x0a\x20\x20\x6c\x65\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x6c\x65\x74\x20\x68\x61\x73\x45\x78\x74\x65\x6e\x64\x73\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x63\x6f\x6d\x70\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x78\x74\x65\x6e\x64\x45\x6d\x69\x74\x73\x20\x3d\x20\x28\x72\x61\x77\x32\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x46\x72\x6f\x6d\x45\x78\x74\x65\x6e\x64\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x45\x6d\x69\x74\x73\x4f\x70\x74\x69\x6f\x6e\x73\x28\x72\x61\x77\x32\x2c\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x46\x72\x6f\x6d\x45\x78\x74\x65\x6e\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x73\x45\x78\x74\x65\x6e\x64\x73\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x78\x74\x65\x6e\x64\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x2c\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x46\x72\x6f\x6d\x45\x78\x74\x65\x6e\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x61\x73\x4d\x69\x78\x69\x6e\x20\x26\x26\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x6d\x69\x78\x69\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x6d\x69\x78\x69\x6e\x73\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x65\x78\x74\x65\x6e\x64\x45\x6d\x69\x74\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6f\x6d\x70\x2e\x65\x78\x74\x65\x6e\x64\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x78\x74\x65\x6e\x64\x45\x6d\x69\x74\x73\x28\x63\x6f\x6d\x70\x2e\x65\x78\x74\x65\x6e\x64\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6f\x6d\x70\x2e\x6d\x69\x78\x69\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6d\x70\x2e\x6d\x69\x78\x69\x6e\x73\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x65\x78\x74\x65\x6e\x64\x45\x6d\x69\x74\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x21\x72\x61\x77\x20\x26\x26\x20\x21\x68\x61\x73\x45\x78\x74\x65\x6e\x64\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x63\x68\x65\x2e\x73\x65\x74\x28\x63\x6f\x6d\x70\x2c\x20\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x72\x61\x77\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x61\x77\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x65\x78\x74\x65\x6e\x64\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x2c\x20\x72\x61\x77\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x61\x63\x68\x65\x2e\x73\x65\x74\x28\x63\x6f\x6d\x70\x2c\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x45\x6d\x69\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x6f\x70\x74\x69\x6f\x6e\x73\x20\x7c\x7c\x20\x21\x69\x73\x4f\x6e\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6b\x65\x79\x20\x3d\x20\x6b\x65\x79\x2e\x73\x6c\x69\x63\x65\x28\x32\x29\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x2f\x4f\x6e\x63\x65\x24\x2f\x2c\x20\x22\x22\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x61\x73\x4f\x77\x6e\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x6b\x65\x79\x5b\x30\x5d\x2e\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65\x28\x29\x20\x2b\x20\x6b\x65\x79\x2e\x73\x6c\x69\x63\x65\x28\x31\x29\x29\x20\x7c\x7c\x20\x68\x61\x73\x4f\x77\x6e\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x28\x6b\x65\x79\x29\x29\x20\x7c\x7c\x20\x68\x61\x73\x4f\x77\x6e\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x7d\x0a\x6c\x65\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x6c\x65\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x53\x63\x6f\x70\x65\x49\x64\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x76\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x53\x63\x6f\x70\x65\x49\x64\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x74\x79\x70\x65\x2e\x5f\x5f\x73\x63\x6f\x70\x65\x49\x64\x20\x7c\x7c\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x65\x76\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x75\x73\x68\x53\x63\x6f\x70\x65\x49\x64\x28\x69\x64\x29\x20\x7b\x0a\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x53\x63\x6f\x70\x65\x49\x64\x20\x3d\x20\x69\x64\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x6f\x70\x53\x63\x6f\x70\x65\x49\x64\x28\x29\x20\x7b\x0a\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x53\x63\x6f\x70\x65\x49\x64\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x77\x69\x74\x68\x53\x63\x6f\x70\x65\x49\x64\x20\x3d\x20\x28\x5f\x69\x64\x29\x20\x3d\x3e\x20\x77\x69\x74\x68\x43\x74\x78\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x69\x74\x68\x43\x74\x78\x28\x66\x6e\x2c\x20\x63\x74\x78\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x69\x73\x4e\x6f\x6e\x53\x63\x6f\x70\x65\x64\x53\x6c\x6f\x74\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x63\x74\x78\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x6e\x3b\x0a\x20\x20\x69\x66\x20\x28\x66\x6e\x2e\x5f\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x6e\x64\x65\x72\x46\x6e\x57\x69\x74\x68\x43\x6f\x6e\x74\x65\x78\x74\x20\x3d\x20\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x72\x65\x6e\x64\x65\x72\x46\x6e\x57\x69\x74\x68\x43\x6f\x6e\x74\x65\x78\x74\x2e\x5f\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x42\x6c\x6f\x63\x6b\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x2d\x31\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x76\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x63\x74\x78\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x66\x6e\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x20\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x70\x72\x65\x76\x49\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x72\x65\x6e\x64\x65\x72\x46\x6e\x57\x69\x74\x68\x43\x6f\x6e\x74\x65\x78\x74\x2e\x5f\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x42\x6c\x6f\x63\x6b\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x31\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x72\x65\x6e\x64\x65\x72\x46\x6e\x57\x69\x74\x68\x43\x6f\x6e\x74\x65\x78\x74\x2e\x5f\x6e\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x72\x65\x6e\x64\x65\x72\x46\x6e\x57\x69\x74\x68\x43\x6f\x6e\x74\x65\x78\x74\x2e\x5f\x63\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x72\x65\x6e\x64\x65\x72\x46\x6e\x57\x69\x74\x68\x43\x6f\x6e\x74\x65\x78\x74\x2e\x5f\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x6e\x64\x65\x72\x46\x6e\x57\x69\x74\x68\x43\x6f\x6e\x74\x65\x78\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x61\x72\x6b\x41\x74\x74\x72\x73\x41\x63\x63\x65\x73\x73\x65\x64\x28\x29\x20\x7b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x6e\x64\x65\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x52\x6f\x6f\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x74\x79\x70\x65\x3a\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x72\x6f\x78\x79\x2c\x20\x77\x69\x74\x68\x50\x72\x6f\x78\x79\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x3a\x20\x5b\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x5d\x2c\x20\x73\x6c\x6f\x74\x73\x2c\x20\x61\x74\x74\x72\x73\x2c\x20\x65\x6d\x69\x74\x2c\x20\x72\x65\x6e\x64\x65\x72\x3a\x20\x72\x65\x6e\x64\x65\x72\x32\x2c\x20\x72\x65\x6e\x64\x65\x72\x43\x61\x63\x68\x65\x2c\x20\x64\x61\x74\x61\x2c\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x63\x74\x78\x2c\x20\x69\x6e\x68\x65\x72\x69\x74\x41\x74\x74\x72\x73\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x72\x65\x73\x75\x6c\x74\x3b\x0a\x20\x20\x6c\x65\x74\x20\x66\x61\x6c\x6c\x74\x68\x72\x6f\x75\x67\x68\x41\x74\x74\x72\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x76\x20\x3d\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x74\x72\x79\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x78\x79\x54\x6f\x55\x73\x65\x20\x3d\x20\x77\x69\x74\x68\x50\x72\x6f\x78\x79\x20\x7c\x7c\x20\x70\x72\x6f\x78\x79\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x72\x65\x6e\x64\x65\x72\x32\x2e\x63\x61\x6c\x6c\x28\x70\x72\x6f\x78\x79\x54\x6f\x55\x73\x65\x2c\x20\x70\x72\x6f\x78\x79\x54\x6f\x55\x73\x65\x2c\x20\x72\x65\x6e\x64\x65\x72\x43\x61\x63\x68\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x64\x61\x74\x61\x2c\x20\x63\x74\x78\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x61\x6c\x6c\x74\x68\x72\x6f\x75\x67\x68\x41\x74\x74\x72\x73\x20\x3d\x20\x61\x74\x74\x72\x73\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x6e\x64\x65\x72\x33\x20\x3d\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x66\x61\x6c\x73\x65\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x72\x65\x6e\x64\x65\x72\x33\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x31\x20\x3f\x20\x72\x65\x6e\x64\x65\x72\x33\x28\x70\x72\x6f\x70\x73\x2c\x20\x66\x61\x6c\x73\x65\x20\x3f\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x67\x65\x74\x20\x61\x74\x74\x72\x73\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x61\x72\x6b\x41\x74\x74\x72\x73\x41\x63\x63\x65\x73\x73\x65\x64\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x74\x74\x72\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x6c\x6f\x74\x73\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6d\x69\x74\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x3a\x20\x7b\x20\x61\x74\x74\x72\x73\x2c\x20\x73\x6c\x6f\x74\x73\x2c\x20\x65\x6d\x69\x74\x20\x7d\x29\x20\x3a\x20\x72\x65\x6e\x64\x65\x72\x33\x28\x70\x72\x6f\x70\x73\x2c\x20\x6e\x75\x6c\x6c\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x61\x6c\x6c\x74\x68\x72\x6f\x75\x67\x68\x41\x74\x74\x72\x73\x20\x3d\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x70\x72\x6f\x70\x73\x20\x3f\x20\x61\x74\x74\x72\x73\x20\x3a\x20\x67\x65\x74\x46\x75\x6e\x63\x74\x69\x6f\x6e\x61\x6c\x46\x61\x6c\x6c\x74\x68\x72\x6f\x75\x67\x68\x28\x61\x74\x74\x72\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x63\x61\x74\x63\x68\x20\x28\x65\x72\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x62\x6c\x6f\x63\x6b\x53\x74\x61\x63\x6b\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x68\x61\x6e\x64\x6c\x65\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x31\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x43\x6f\x6d\x6d\x65\x6e\x74\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6c\x65\x74\x20\x72\x6f\x6f\x74\x20\x3d\x20\x72\x65\x73\x75\x6c\x74\x3b\x0a\x20\x20\x69\x66\x20\x28\x66\x61\x6c\x6c\x74\x68\x72\x6f\x75\x67\x68\x41\x74\x74\x72\x73\x20\x26\x26\x20\x69\x6e\x68\x65\x72\x69\x74\x41\x74\x74\x72\x73\x20\x21\x3d\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x73\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x66\x61\x6c\x6c\x74\x68\x72\x6f\x75\x67\x68\x41\x74\x74\x72\x73\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x7d\x20\x3d\x20\x72\x6f\x6f\x74\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x28\x31\x20\x7c\x20\x36\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x20\x26\x26\x20\x6b\x65\x79\x73\x2e\x73\x6f\x6d\x65\x28\x69\x73\x4d\x6f\x64\x65\x6c\x4c\x69\x73\x74\x65\x6e\x65\x72\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x61\x6c\x6c\x74\x68\x72\x6f\x75\x67\x68\x41\x74\x74\x72\x73\x20\x3d\x20\x66\x69\x6c\x74\x65\x72\x4d\x6f\x64\x65\x6c\x4c\x69\x73\x74\x65\x6e\x65\x72\x73\x28\x66\x61\x6c\x6c\x74\x68\x72\x6f\x75\x67\x68\x41\x74\x74\x72\x73\x2c\x20\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x6f\x6f\x74\x20\x3d\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x28\x72\x6f\x6f\x74\x2c\x20\x66\x61\x6c\x6c\x74\x68\x72\x6f\x75\x67\x68\x41\x74\x74\x72\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x64\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x6f\x6f\x74\x20\x3d\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x28\x72\x6f\x6f\x74\x29\x3b\x0a\x20\x20\x20\x20\x72\x6f\x6f\x74\x2e\x64\x69\x72\x73\x20\x3d\x20\x72\x6f\x6f\x74\x2e\x64\x69\x72\x73\x20\x3f\x20\x72\x6f\x6f\x74\x2e\x64\x69\x72\x73\x2e\x63\x6f\x6e\x63\x61\x74\x28\x76\x6e\x6f\x64\x65\x2e\x64\x69\x72\x73\x29\x20\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x64\x69\x72\x73\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x6f\x6f\x74\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x72\x6f\x6f\x74\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x70\x72\x65\x76\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x75\x6c\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x69\x6c\x74\x65\x72\x53\x69\x6e\x67\x6c\x65\x52\x6f\x6f\x74\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x73\x69\x6e\x67\x6c\x65\x52\x6f\x6f\x74\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x69\x6c\x64\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x56\x4e\x6f\x64\x65\x28\x63\x68\x69\x6c\x64\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x20\x7c\x7c\x20\x63\x68\x69\x6c\x64\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x3d\x3d\x20\x22\x76\x2d\x69\x66\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x69\x6e\x67\x6c\x65\x52\x6f\x6f\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x69\x6e\x67\x6c\x65\x52\x6f\x6f\x74\x20\x3d\x20\x63\x68\x69\x6c\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x69\x6e\x67\x6c\x65\x52\x6f\x6f\x74\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x46\x75\x6e\x63\x74\x69\x6f\x6e\x61\x6c\x46\x61\x6c\x6c\x74\x68\x72\x6f\x75\x67\x68\x20\x3d\x20\x28\x61\x74\x74\x72\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x72\x65\x73\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x61\x74\x74\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x63\x6c\x61\x73\x73\x22\x20\x7c\x7c\x20\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x73\x74\x79\x6c\x65\x22\x20\x7c\x7c\x20\x69\x73\x4f\x6e\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x28\x72\x65\x73\x20\x7c\x7c\x20\x28\x72\x65\x73\x20\x3d\x20\x7b\x7d\x29\x29\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x61\x74\x74\x72\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x66\x69\x6c\x74\x65\x72\x4d\x6f\x64\x65\x6c\x4c\x69\x73\x74\x65\x6e\x65\x72\x73\x20\x3d\x20\x28\x61\x74\x74\x72\x73\x2c\x20\x70\x72\x6f\x70\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x61\x74\x74\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x4d\x6f\x64\x65\x6c\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x6b\x65\x79\x29\x20\x7c\x7c\x20\x21\x28\x6b\x65\x79\x2e\x73\x6c\x69\x63\x65\x28\x39\x29\x20\x69\x6e\x20\x70\x72\x6f\x70\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x61\x74\x74\x72\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x68\x6f\x75\x6c\x64\x55\x70\x64\x61\x74\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x2c\x20\x6e\x65\x78\x74\x56\x4e\x6f\x64\x65\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x70\x72\x6f\x70\x73\x3a\x20\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x3a\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x7d\x20\x3d\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x70\x72\x6f\x70\x73\x3a\x20\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x3a\x20\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x7d\x20\x3d\x20\x6e\x65\x78\x74\x56\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6d\x69\x74\x73\x20\x3d\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x65\x6d\x69\x74\x73\x4f\x70\x74\x69\x6f\x6e\x73\x3b\x0a\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x56\x4e\x6f\x64\x65\x2e\x64\x69\x72\x73\x20\x7c\x7c\x20\x6e\x65\x78\x74\x56\x4e\x6f\x64\x65\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x26\x26\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3e\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x31\x30\x32\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x21\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x61\x73\x50\x72\x6f\x70\x73\x43\x68\x61\x6e\x67\x65\x64\x28\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x2c\x20\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x2c\x20\x65\x6d\x69\x74\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x20\x3d\x20\x6e\x65\x78\x74\x56\x4e\x6f\x64\x65\x2e\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x3d\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x21\x3d\x3d\x20\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x26\x26\x20\x21\x69\x73\x45\x6d\x69\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6d\x69\x74\x73\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x7c\x7c\x20\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x7c\x7c\x20\x21\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x2e\x24\x73\x74\x61\x62\x6c\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x20\x3d\x3d\x3d\x20\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x21\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x61\x73\x50\x72\x6f\x70\x73\x43\x68\x61\x6e\x67\x65\x64\x28\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x2c\x20\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x2c\x20\x65\x6d\x69\x74\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x68\x61\x73\x50\x72\x6f\x70\x73\x43\x68\x61\x6e\x67\x65\x64\x28\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x2c\x20\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x2c\x20\x65\x6d\x69\x74\x73\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x4b\x65\x79\x73\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x4b\x65\x79\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x21\x3d\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x29\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x6e\x65\x78\x74\x4b\x65\x79\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x3d\x20\x6e\x65\x78\x74\x4b\x65\x79\x73\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x21\x3d\x3d\x20\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x26\x26\x20\x21\x69\x73\x45\x6d\x69\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6d\x69\x74\x73\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x75\x70\x64\x61\x74\x65\x48\x4f\x43\x48\x6f\x73\x74\x45\x6c\x28\x7b\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x20\x7d\x2c\x20\x65\x6c\x29\x20\x7b\x0a\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x70\x61\x72\x65\x6e\x74\x20\x26\x26\x20\x70\x61\x72\x65\x6e\x74\x2e\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x3d\x3d\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x28\x76\x6e\x6f\x64\x65\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x2e\x76\x6e\x6f\x64\x65\x29\x2e\x65\x6c\x20\x3d\x20\x65\x6c\x3b\x0a\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x28\x74\x79\x70\x65\x29\x20\x3d\x3e\x20\x74\x79\x70\x65\x2e\x5f\x5f\x69\x73\x53\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x53\x75\x73\x70\x65\x6e\x73\x65\x49\x6d\x70\x6c\x20\x3d\x20\x7b\x0a\x20\x20\x6e\x61\x6d\x65\x3a\x20\x22\x53\x75\x73\x70\x65\x6e\x73\x65\x22\x2c\x0a\x20\x20\x5f\x5f\x69\x73\x53\x75\x73\x70\x65\x6e\x73\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x70\x72\x6f\x63\x65\x73\x73\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x28\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x53\x75\x73\x70\x65\x6e\x73\x65\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x68\x79\x64\x72\x61\x74\x65\x3a\x20\x68\x79\x64\x72\x61\x74\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x3a\x20\x63\x72\x65\x61\x74\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x42\x6f\x75\x6e\x64\x61\x72\x79\x2c\x0a\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x53\x75\x73\x70\x65\x6e\x73\x65\x49\x6d\x70\x6c\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x69\x67\x67\x65\x72\x45\x76\x65\x6e\x74\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x61\x6d\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x5b\x6e\x61\x6d\x65\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x65\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x6f\x75\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x70\x3a\x20\x70\x61\x74\x63\x68\x2c\x20\x6f\x3a\x20\x7b\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x20\x7d\x20\x7d\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x69\x64\x64\x65\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x28\x22\x64\x69\x76\x22\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x42\x6f\x75\x6e\x64\x61\x72\x79\x28\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x68\x69\x64\x64\x65\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x3b\x0a\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x2c\x20\x68\x69\x64\x64\x65\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x20\x3e\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x45\x76\x65\x6e\x74\x28\x76\x6e\x6f\x64\x65\x2c\x20\x22\x6f\x6e\x50\x65\x6e\x64\x69\x6e\x67\x22\x29\x3b\x0a\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x45\x76\x65\x6e\x74\x28\x76\x6e\x6f\x64\x65\x2c\x20\x22\x6f\x6e\x46\x61\x6c\x6c\x62\x61\x63\x6b\x22\x29\x3b\x0a\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x46\x61\x6c\x6c\x62\x61\x63\x6b\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x3b\x0a\x20\x20\x20\x20\x73\x65\x74\x41\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x46\x61\x6c\x6c\x62\x61\x63\x6b\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x61\x74\x63\x68\x53\x75\x73\x70\x65\x6e\x73\x65\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x7b\x20\x70\x3a\x20\x70\x61\x74\x63\x68\x2c\x20\x75\x6d\x3a\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x2c\x20\x6f\x3a\x20\x7b\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x20\x7d\x20\x7d\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x6e\x32\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x6e\x31\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x76\x6e\x6f\x64\x65\x20\x3d\x20\x6e\x32\x3b\x0a\x20\x20\x6e\x32\x2e\x65\x6c\x20\x3d\x20\x6e\x31\x2e\x65\x6c\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x20\x3d\x20\x6e\x32\x2e\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x46\x61\x6c\x6c\x62\x61\x63\x6b\x20\x3d\x20\x6e\x32\x2e\x73\x73\x46\x61\x6c\x6c\x62\x61\x63\x6b\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x2c\x20\x69\x73\x49\x6e\x46\x61\x6c\x6c\x62\x61\x63\x6b\x2c\x20\x69\x73\x48\x79\x64\x72\x61\x74\x69\x6e\x67\x20\x7d\x20\x3d\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x20\x3d\x20\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x2c\x20\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x2c\x20\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x68\x69\x64\x64\x65\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x20\x3c\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x49\x6e\x46\x61\x6c\x6c\x62\x61\x63\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x6e\x65\x77\x46\x61\x6c\x6c\x62\x61\x63\x6b\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x41\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x6e\x65\x77\x46\x61\x6c\x6c\x62\x61\x63\x6b\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x48\x79\x64\x72\x61\x74\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x69\x73\x48\x79\x64\x72\x61\x74\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x20\x3d\x20\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x65\x66\x66\x65\x63\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x68\x69\x64\x64\x65\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x28\x22\x64\x69\x76\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x49\x6e\x46\x61\x6c\x6c\x62\x61\x63\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x68\x69\x64\x64\x65\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x20\x3c\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x6e\x65\x77\x46\x61\x6c\x6c\x62\x61\x63\x6b\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x41\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x6e\x65\x77\x46\x61\x6c\x6c\x62\x61\x63\x6b\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x20\x26\x26\x20\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x2c\x20\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x68\x69\x64\x64\x65\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x20\x3c\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x20\x26\x26\x20\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x2c\x20\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x41\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x45\x76\x65\x6e\x74\x28\x6e\x32\x2c\x20\x22\x6f\x6e\x50\x65\x6e\x64\x69\x6e\x67\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x20\x3d\x20\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x6e\x65\x77\x42\x72\x61\x6e\x63\x68\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x68\x69\x64\x64\x65\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x20\x3c\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x74\x69\x6d\x65\x6f\x75\x74\x2c\x20\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x20\x7d\x20\x3d\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x69\x6d\x65\x6f\x75\x74\x20\x3e\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x54\x69\x6d\x65\x6f\x75\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x20\x3d\x3d\x3d\x20\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x66\x61\x6c\x6c\x62\x61\x63\x6b\x28\x6e\x65\x77\x46\x61\x6c\x6c\x62\x61\x63\x6b\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x74\x69\x6d\x65\x6f\x75\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x69\x6d\x65\x6f\x75\x74\x20\x3d\x3d\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x66\x61\x6c\x6c\x62\x61\x63\x6b\x28\x6e\x65\x77\x46\x61\x6c\x6c\x62\x61\x63\x6b\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x42\x6f\x75\x6e\x64\x61\x72\x79\x28\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x68\x69\x64\x64\x65\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x2c\x20\x69\x73\x48\x79\x64\x72\x61\x74\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x70\x3a\x20\x70\x61\x74\x63\x68\x2c\x20\x6d\x3a\x20\x6d\x6f\x76\x65\x2c\x20\x75\x6d\x3a\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x2c\x20\x6e\x3a\x20\x6e\x65\x78\x74\x2c\x20\x6f\x3a\x20\x7b\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x2c\x20\x72\x65\x6d\x6f\x76\x65\x3a\x20\x72\x65\x6d\x6f\x76\x65\x32\x20\x7d\x20\x7d\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x69\x6d\x65\x6f\x75\x74\x20\x3d\x20\x74\x6f\x4e\x75\x6d\x62\x65\x72\x28\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x74\x69\x6d\x65\x6f\x75\x74\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2c\x0a\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x2c\x0a\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x20\x20\x69\x73\x53\x56\x47\x2c\x0a\x20\x20\x20\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x0a\x20\x20\x20\x20\x68\x69\x64\x64\x65\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x0a\x20\x20\x20\x20\x61\x6e\x63\x68\x6f\x72\x2c\x0a\x20\x20\x20\x20\x64\x65\x70\x73\x3a\x20\x30\x2c\x0a\x20\x20\x20\x20\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x3a\x20\x30\x2c\x0a\x20\x20\x20\x20\x74\x69\x6d\x65\x6f\x75\x74\x3a\x20\x74\x79\x70\x65\x6f\x66\x20\x74\x69\x6d\x65\x6f\x75\x74\x20\x3d\x3d\x3d\x20\x22\x6e\x75\x6d\x62\x65\x72\x22\x20\x3f\x20\x74\x69\x6d\x65\x6f\x75\x74\x20\x3a\x20\x2d\x31\x2c\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x69\x73\x49\x6e\x46\x61\x6c\x6c\x62\x61\x63\x6b\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x69\x73\x48\x79\x64\x72\x61\x74\x69\x6e\x67\x2c\x0a\x20\x20\x20\x20\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x3a\x20\x66\x61\x6c\x73\x65\x2c\x0a\x20\x20\x20\x20\x65\x66\x66\x65\x63\x74\x73\x3a\x20\x5b\x5d\x2c\x0a\x20\x20\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x28\x72\x65\x73\x75\x6d\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x76\x6e\x6f\x64\x65\x3a\x20\x76\x6e\x6f\x64\x65\x32\x2c\x20\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x2c\x20\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x2c\x20\x65\x66\x66\x65\x63\x74\x73\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3a\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x3a\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x32\x20\x7d\x20\x3d\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x69\x73\x48\x79\x64\x72\x61\x74\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x69\x73\x48\x79\x64\x72\x61\x74\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x72\x65\x73\x75\x6d\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x65\x6c\x61\x79\x45\x6e\x74\x65\x72\x20\x3d\x20\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x20\x26\x26\x20\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x26\x26\x20\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x6d\x6f\x64\x65\x20\x3d\x3d\x3d\x20\x22\x6f\x75\x74\x2d\x69\x6e\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x65\x6c\x61\x79\x45\x6e\x74\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x61\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x20\x3d\x3d\x3d\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x28\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x32\x2c\x20\x61\x6e\x63\x68\x6f\x72\x32\x2c\x20\x30\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x7b\x20\x61\x6e\x63\x68\x6f\x72\x3a\x20\x61\x6e\x63\x68\x6f\x72\x32\x20\x7d\x20\x3d\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x6e\x63\x68\x6f\x72\x32\x20\x3d\x20\x6e\x65\x78\x74\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x32\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x64\x65\x6c\x61\x79\x45\x6e\x74\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x28\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x32\x2c\x20\x61\x6e\x63\x68\x6f\x72\x32\x2c\x20\x30\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x41\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x69\x73\x49\x6e\x46\x61\x6c\x6c\x62\x61\x63\x6b\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x70\x61\x72\x65\x6e\x74\x32\x20\x3d\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x68\x61\x73\x55\x6e\x72\x65\x73\x6f\x6c\x76\x65\x64\x41\x6e\x63\x65\x73\x74\x6f\x72\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x70\x61\x72\x65\x6e\x74\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x72\x65\x6e\x74\x32\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x32\x2e\x65\x66\x66\x65\x63\x74\x73\x2e\x70\x75\x73\x68\x28\x2e\x2e\x2e\x65\x66\x66\x65\x63\x74\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x73\x55\x6e\x72\x65\x73\x6f\x6c\x76\x65\x64\x41\x6e\x63\x65\x73\x74\x6f\x72\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x32\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x32\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x68\x61\x73\x55\x6e\x72\x65\x73\x6f\x6c\x76\x65\x64\x41\x6e\x63\x65\x73\x74\x6f\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x28\x65\x66\x66\x65\x63\x74\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x65\x66\x66\x65\x63\x74\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x45\x76\x65\x6e\x74\x28\x76\x6e\x6f\x64\x65\x32\x2c\x20\x22\x6f\x6e\x52\x65\x73\x6f\x6c\x76\x65\x22\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x28\x66\x61\x6c\x6c\x62\x61\x63\x6b\x56\x4e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x76\x6e\x6f\x64\x65\x3a\x20\x76\x6e\x6f\x64\x65\x32\x2c\x20\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3a\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x3a\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x32\x2c\x20\x69\x73\x53\x56\x47\x3a\x20\x69\x73\x53\x56\x47\x32\x20\x7d\x20\x3d\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x45\x76\x65\x6e\x74\x28\x76\x6e\x6f\x64\x65\x32\x2c\x20\x22\x6f\x6e\x46\x61\x6c\x6c\x62\x61\x63\x6b\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x6e\x63\x68\x6f\x72\x32\x20\x3d\x20\x6e\x65\x78\x74\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x75\x6e\x74\x46\x61\x6c\x6c\x62\x61\x63\x6b\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x69\x73\x49\x6e\x46\x61\x6c\x6c\x62\x61\x63\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x56\x4e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x32\x2c\x20\x61\x6e\x63\x68\x6f\x72\x32\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x32\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x69\x73\x53\x56\x47\x32\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x41\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x56\x4e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x65\x6c\x61\x79\x45\x6e\x74\x65\x72\x20\x3d\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x56\x4e\x6f\x64\x65\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x26\x26\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x56\x4e\x6f\x64\x65\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x6d\x6f\x64\x65\x20\x3d\x3d\x3d\x20\x22\x6f\x75\x74\x2d\x69\x6e\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x65\x6c\x61\x79\x45\x6e\x74\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x61\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x20\x3d\x20\x6d\x6f\x75\x6e\x74\x46\x61\x6c\x6c\x62\x61\x63\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x69\x73\x49\x6e\x46\x61\x6c\x6c\x62\x61\x63\x6b\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x32\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x64\x65\x6c\x61\x79\x45\x6e\x74\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x46\x61\x6c\x6c\x62\x61\x63\x6b\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x6d\x6f\x76\x65\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x32\x2c\x20\x61\x6e\x63\x68\x6f\x72\x32\x2c\x20\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x20\x26\x26\x20\x6d\x6f\x76\x65\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x32\x2c\x20\x61\x6e\x63\x68\x6f\x72\x32\x2c\x20\x74\x79\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x32\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x6e\x65\x78\x74\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x20\x26\x26\x20\x6e\x65\x78\x74\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x44\x65\x70\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x73\x65\x74\x75\x70\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x49\x6e\x50\x65\x6e\x64\x69\x6e\x67\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x21\x21\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x49\x6e\x50\x65\x6e\x64\x69\x6e\x67\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x79\x64\x72\x61\x74\x65\x64\x45\x6c\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x73\x79\x6e\x63\x44\x65\x70\x2e\x63\x61\x74\x63\x68\x28\x28\x65\x72\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x6e\x64\x6c\x65\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x30\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x2e\x74\x68\x65\x6e\x28\x28\x61\x73\x79\x6e\x63\x53\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x20\x7c\x7c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x20\x7c\x7c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x20\x21\x3d\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x49\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x73\x79\x6e\x63\x52\x65\x73\x6f\x6c\x76\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x76\x6e\x6f\x64\x65\x3a\x20\x76\x6e\x6f\x64\x65\x32\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x6e\x64\x6c\x65\x53\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x61\x73\x79\x6e\x63\x53\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x68\x79\x64\x72\x61\x74\x65\x64\x45\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x32\x2e\x65\x6c\x20\x3d\x20\x68\x79\x64\x72\x61\x74\x65\x64\x45\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x20\x3d\x20\x21\x68\x79\x64\x72\x61\x74\x65\x64\x45\x6c\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x75\x70\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x76\x6e\x6f\x64\x65\x32\x2c\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x28\x68\x79\x64\x72\x61\x74\x65\x64\x45\x6c\x20\x7c\x7c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x2e\x65\x6c\x29\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x64\x45\x6c\x20\x3f\x20\x6e\x75\x6c\x6c\x20\x3a\x20\x6e\x65\x78\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x29\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x32\x28\x70\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x48\x4f\x43\x48\x6f\x73\x74\x45\x6c\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x76\x6e\x6f\x64\x65\x32\x2e\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x49\x6e\x50\x65\x6e\x64\x69\x6e\x67\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x26\x26\x20\x2d\x2d\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x20\x3d\x3d\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x68\x79\x64\x72\x61\x74\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x42\x6f\x75\x6e\x64\x61\x72\x79\x28\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x6e\x6f\x64\x65\x2e\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x2c\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x28\x22\x64\x69\x76\x22\x29\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x28\x6e\x6f\x64\x65\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x20\x3d\x3d\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x75\x6c\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x53\x6c\x6f\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x33\x32\x3b\x0a\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x53\x6c\x6f\x74\x28\x69\x73\x53\x6c\x6f\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3f\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x64\x65\x66\x61\x75\x6c\x74\x20\x3a\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x46\x61\x6c\x6c\x62\x61\x63\x6b\x20\x3d\x20\x69\x73\x53\x6c\x6f\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3f\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x53\x6c\x6f\x74\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x66\x61\x6c\x6c\x62\x61\x63\x6b\x29\x20\x3a\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x43\x6f\x6d\x6d\x65\x6e\x74\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x75\x73\x70\x65\x6e\x73\x65\x53\x6c\x6f\x74\x28\x73\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x62\x6c\x6f\x63\x6b\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x72\x61\x63\x6b\x42\x6c\x6f\x63\x6b\x20\x3d\x20\x69\x73\x42\x6c\x6f\x63\x6b\x54\x72\x65\x65\x45\x6e\x61\x62\x6c\x65\x64\x20\x26\x26\x20\x73\x2e\x5f\x63\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x61\x63\x6b\x42\x6c\x6f\x63\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x2e\x5f\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x6f\x70\x65\x6e\x42\x6c\x6f\x63\x6b\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x73\x20\x3d\x20\x73\x28\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x61\x63\x6b\x42\x6c\x6f\x63\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x2e\x5f\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x62\x6c\x6f\x63\x6b\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6c\x6f\x73\x65\x42\x6c\x6f\x63\x6b\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x69\x6e\x67\x6c\x65\x43\x68\x69\x6c\x64\x20\x3d\x20\x66\x69\x6c\x74\x65\x72\x53\x69\x6e\x67\x6c\x65\x52\x6f\x6f\x74\x28\x73\x29\x3b\x0a\x20\x20\x20\x20\x73\x20\x3d\x20\x73\x69\x6e\x67\x6c\x65\x43\x68\x69\x6c\x64\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x73\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x73\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x62\x6c\x6f\x63\x6b\x20\x26\x26\x20\x21\x73\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x62\x6c\x6f\x63\x6b\x2e\x66\x69\x6c\x74\x65\x72\x28\x28\x63\x29\x20\x3d\x3e\x20\x63\x20\x21\x3d\x3d\x20\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x71\x75\x65\x75\x65\x45\x66\x66\x65\x63\x74\x57\x69\x74\x68\x53\x75\x73\x70\x65\x6e\x73\x65\x28\x66\x6e\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x26\x26\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x66\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x65\x66\x66\x65\x63\x74\x73\x2e\x70\x75\x73\x68\x28\x2e\x2e\x2e\x66\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x65\x66\x66\x65\x63\x74\x73\x2e\x70\x75\x73\x68\x28\x66\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x28\x66\x6e\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x41\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x62\x72\x61\x6e\x63\x68\x29\x20\x7b\x0a\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x20\x3d\x20\x62\x72\x61\x6e\x63\x68\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x7d\x20\x3d\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6c\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x20\x3d\x20\x62\x72\x61\x6e\x63\x68\x2e\x65\x6c\x3b\x0a\x20\x20\x69\x66\x20\x28\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x26\x26\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x3d\x3d\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x20\x3d\x20\x65\x6c\x3b\x0a\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x48\x4f\x43\x48\x6f\x73\x74\x45\x6c\x28\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x65\x6c\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x72\x6f\x76\x69\x64\x65\x28\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x29\x0a\x20\x20\x20\x20\x3b\x0a\x20\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x76\x69\x64\x65\x73\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x72\x65\x6e\x74\x50\x72\x6f\x76\x69\x64\x65\x73\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x20\x26\x26\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x2e\x70\x72\x6f\x76\x69\x64\x65\x73\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x72\x65\x6e\x74\x50\x72\x6f\x76\x69\x64\x65\x73\x20\x3d\x3d\x3d\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x76\x69\x64\x65\x73\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x70\x61\x72\x65\x6e\x74\x50\x72\x6f\x76\x69\x64\x65\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x6a\x65\x63\x74\x28\x6b\x65\x79\x2c\x20\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x2c\x20\x74\x72\x65\x61\x74\x44\x65\x66\x61\x75\x6c\x74\x41\x73\x46\x61\x63\x74\x6f\x72\x79\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x7c\x7c\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x70\x72\x6f\x76\x69\x64\x65\x73\x20\x3a\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x2e\x70\x72\x6f\x76\x69\x64\x65\x73\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x6f\x76\x69\x64\x65\x73\x20\x26\x26\x20\x6b\x65\x79\x20\x69\x6e\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x65\x61\x74\x44\x65\x66\x61\x75\x6c\x74\x41\x73\x46\x61\x63\x74\x6f\x72\x79\x20\x26\x26\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x29\x20\x3f\x20\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x2e\x63\x61\x6c\x6c\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x78\x79\x29\x20\x3a\x20\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x61\x74\x63\x68\x45\x66\x66\x65\x63\x74\x28\x65\x66\x66\x65\x63\x74\x32\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x6f\x57\x61\x74\x63\x68\x28\x65\x66\x66\x65\x63\x74\x32\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x61\x74\x63\x68\x50\x6f\x73\x74\x45\x66\x66\x65\x63\x74\x28\x65\x66\x66\x65\x63\x74\x32\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x6f\x57\x61\x74\x63\x68\x28\x65\x66\x66\x65\x63\x74\x32\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x7b\x20\x66\x6c\x75\x73\x68\x3a\x20\x22\x70\x6f\x73\x74\x22\x20\x7d\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x61\x74\x63\x68\x53\x79\x6e\x63\x45\x66\x66\x65\x63\x74\x28\x65\x66\x66\x65\x63\x74\x32\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x6f\x57\x61\x74\x63\x68\x28\x65\x66\x66\x65\x63\x74\x32\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x7b\x20\x66\x6c\x75\x73\x68\x3a\x20\x22\x73\x79\x6e\x63\x22\x20\x7d\x29\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x49\x4e\x49\x54\x49\x41\x4c\x5f\x57\x41\x54\x43\x48\x45\x52\x5f\x56\x41\x4c\x55\x45\x20\x3d\x20\x7b\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x61\x74\x63\x68\x28\x73\x6f\x75\x72\x63\x65\x2c\x20\x63\x62\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x6f\x57\x61\x74\x63\x68\x28\x73\x6f\x75\x72\x63\x65\x2c\x20\x63\x62\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x64\x6f\x57\x61\x74\x63\x68\x28\x73\x6f\x75\x72\x63\x65\x2c\x20\x63\x62\x2c\x20\x7b\x20\x69\x6d\x6d\x65\x64\x69\x61\x74\x65\x2c\x20\x64\x65\x65\x70\x2c\x20\x66\x6c\x75\x73\x68\x2c\x20\x6f\x6e\x54\x72\x61\x63\x6b\x2c\x20\x6f\x6e\x54\x72\x69\x67\x67\x65\x72\x20\x7d\x20\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x67\x65\x74\x74\x65\x72\x3b\x0a\x20\x20\x6c\x65\x74\x20\x66\x6f\x72\x63\x65\x54\x72\x69\x67\x67\x65\x72\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x69\x73\x4d\x75\x6c\x74\x69\x53\x6f\x75\x72\x63\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x66\x28\x73\x6f\x75\x72\x63\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x73\x6f\x75\x72\x63\x65\x2e\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x63\x65\x54\x72\x69\x67\x67\x65\x72\x20\x3d\x20\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x28\x73\x6f\x75\x72\x63\x65\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x28\x73\x6f\x75\x72\x63\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x73\x6f\x75\x72\x63\x65\x3b\x0a\x20\x20\x20\x20\x64\x65\x65\x70\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x73\x6f\x75\x72\x63\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x73\x4d\x75\x6c\x74\x69\x53\x6f\x75\x72\x63\x65\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x63\x65\x54\x72\x69\x67\x67\x65\x72\x20\x3d\x20\x73\x6f\x75\x72\x63\x65\x2e\x73\x6f\x6d\x65\x28\x28\x73\x29\x20\x3d\x3e\x20\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x28\x73\x29\x20\x7c\x7c\x20\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x28\x73\x29\x29\x3b\x0a\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x73\x6f\x75\x72\x63\x65\x2e\x6d\x61\x70\x28\x28\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x66\x28\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x2e\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x28\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x61\x76\x65\x72\x73\x65\x28\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x73\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x73\x6f\x75\x72\x63\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x62\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x73\x6f\x75\x72\x63\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6c\x65\x61\x6e\x75\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6c\x65\x61\x6e\x75\x70\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x73\x6f\x75\x72\x63\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x33\x2c\x20\x5b\x6f\x6e\x43\x6c\x65\x61\x6e\x75\x70\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x4e\x4f\x4f\x50\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x63\x62\x20\x26\x26\x20\x64\x65\x65\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x62\x61\x73\x65\x47\x65\x74\x74\x65\x72\x20\x3d\x20\x67\x65\x74\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x74\x72\x61\x76\x65\x72\x73\x65\x28\x62\x61\x73\x65\x47\x65\x74\x74\x65\x72\x28\x29\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6c\x65\x74\x20\x63\x6c\x65\x61\x6e\x75\x70\x3b\x0a\x20\x20\x6c\x65\x74\x20\x6f\x6e\x43\x6c\x65\x61\x6e\x75\x70\x20\x3d\x20\x28\x66\x6e\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6c\x65\x61\x6e\x75\x70\x20\x3d\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x6f\x6e\x53\x74\x6f\x70\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x66\x6e\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x34\x29\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x49\x6e\x53\x53\x52\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x53\x65\x74\x75\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x6f\x6e\x43\x6c\x65\x61\x6e\x75\x70\x20\x3d\x20\x4e\x4f\x4f\x50\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x63\x62\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x6d\x6d\x65\x64\x69\x61\x74\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x63\x62\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x33\x2c\x20\x5b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x67\x65\x74\x74\x65\x72\x28\x29\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x73\x4d\x75\x6c\x74\x69\x53\x6f\x75\x72\x63\x65\x20\x3f\x20\x5b\x5d\x20\x3a\x20\x76\x6f\x69\x64\x20\x30\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x6e\x43\x6c\x65\x61\x6e\x75\x70\x0a\x20\x20\x20\x20\x20\x20\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x4e\x4f\x4f\x50\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6c\x65\x74\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x3d\x20\x69\x73\x4d\x75\x6c\x74\x69\x53\x6f\x75\x72\x63\x65\x20\x3f\x20\x5b\x5d\x20\x3a\x20\x49\x4e\x49\x54\x49\x41\x4c\x5f\x57\x41\x54\x43\x48\x45\x52\x5f\x56\x41\x4c\x55\x45\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6a\x6f\x62\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x65\x66\x66\x65\x63\x74\x32\x2e\x61\x63\x74\x69\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x62\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x20\x3d\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x72\x75\x6e\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x65\x65\x70\x20\x7c\x7c\x20\x66\x6f\x72\x63\x65\x54\x72\x69\x67\x67\x65\x72\x20\x7c\x7c\x20\x28\x69\x73\x4d\x75\x6c\x74\x69\x53\x6f\x75\x72\x63\x65\x20\x3f\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x2e\x73\x6f\x6d\x65\x28\x28\x76\x2c\x20\x69\x29\x20\x3d\x3e\x20\x68\x61\x73\x43\x68\x61\x6e\x67\x65\x64\x28\x76\x2c\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x5b\x69\x5d\x29\x29\x20\x3a\x20\x68\x61\x73\x43\x68\x61\x6e\x67\x65\x64\x28\x6e\x65\x77\x56\x61\x6c\x75\x65\x2c\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x29\x20\x7c\x7c\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6c\x65\x61\x6e\x75\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6c\x65\x61\x6e\x75\x70\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x63\x62\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x33\x2c\x20\x5b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x3d\x3d\x3d\x20\x49\x4e\x49\x54\x49\x41\x4c\x5f\x57\x41\x54\x43\x48\x45\x52\x5f\x56\x41\x4c\x55\x45\x20\x3f\x20\x76\x6f\x69\x64\x20\x30\x20\x3a\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x6e\x43\x6c\x65\x61\x6e\x75\x70\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x3d\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x72\x75\x6e\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x6a\x6f\x62\x2e\x61\x6c\x6c\x6f\x77\x52\x65\x63\x75\x72\x73\x65\x20\x3d\x20\x21\x21\x63\x62\x3b\x0a\x20\x20\x6c\x65\x74\x20\x73\x63\x68\x65\x64\x75\x6c\x65\x72\x3b\x0a\x20\x20\x69\x66\x20\x28\x66\x6c\x75\x73\x68\x20\x3d\x3d\x3d\x20\x22\x73\x79\x6e\x63\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x63\x68\x65\x64\x75\x6c\x65\x72\x20\x3d\x20\x6a\x6f\x62\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x66\x6c\x75\x73\x68\x20\x3d\x3d\x3d\x20\x22\x70\x6f\x73\x74\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x63\x68\x65\x64\x75\x6c\x65\x72\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x6a\x6f\x62\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x73\x63\x68\x65\x64\x75\x6c\x65\x72\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x71\x75\x65\x75\x65\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x28\x6a\x6f\x62\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x66\x66\x65\x63\x74\x32\x20\x3d\x20\x6e\x65\x77\x20\x52\x65\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x28\x67\x65\x74\x74\x65\x72\x2c\x20\x73\x63\x68\x65\x64\x75\x6c\x65\x72\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x63\x62\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6d\x6d\x65\x64\x69\x61\x74\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6a\x6f\x62\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x3d\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x72\x75\x6e\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x66\x6c\x75\x73\x68\x20\x3d\x3d\x3d\x20\x22\x70\x6f\x73\x74\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x65\x66\x66\x65\x63\x74\x32\x2e\x72\x75\x6e\x2e\x62\x69\x6e\x64\x28\x65\x66\x66\x65\x63\x74\x32\x29\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x72\x75\x6e\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x73\x74\x6f\x70\x28\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x63\x6f\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x63\x6f\x70\x65\x2e\x65\x66\x66\x65\x63\x74\x73\x2c\x20\x65\x66\x66\x65\x63\x74\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x57\x61\x74\x63\x68\x28\x73\x6f\x75\x72\x63\x65\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x20\x3d\x20\x74\x68\x69\x73\x2e\x70\x72\x6f\x78\x79\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x73\x6f\x75\x72\x63\x65\x29\x20\x3f\x20\x73\x6f\x75\x72\x63\x65\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x22\x2e\x22\x29\x20\x3f\x20\x63\x72\x65\x61\x74\x65\x50\x61\x74\x68\x47\x65\x74\x74\x65\x72\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x2c\x20\x73\x6f\x75\x72\x63\x65\x29\x20\x3a\x20\x28\x29\x20\x3d\x3e\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x5b\x73\x6f\x75\x72\x63\x65\x5d\x20\x3a\x20\x73\x6f\x75\x72\x63\x65\x2e\x62\x69\x6e\x64\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x2c\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x3b\x0a\x20\x20\x6c\x65\x74\x20\x63\x62\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x62\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x63\x62\x20\x3d\x20\x76\x61\x6c\x75\x65\x2e\x68\x61\x6e\x64\x6c\x65\x72\x3b\x0a\x20\x20\x20\x20\x6f\x70\x74\x69\x6f\x6e\x73\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x75\x72\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x74\x68\x69\x73\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x64\x6f\x57\x61\x74\x63\x68\x28\x67\x65\x74\x74\x65\x72\x2c\x20\x63\x62\x2e\x62\x69\x6e\x64\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x63\x75\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x63\x75\x72\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x75\x6e\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x50\x61\x74\x68\x47\x65\x74\x74\x65\x72\x28\x63\x74\x78\x2c\x20\x70\x61\x74\x68\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x67\x6d\x65\x6e\x74\x73\x20\x3d\x20\x70\x61\x74\x68\x2e\x73\x70\x6c\x69\x74\x28\x22\x2e\x22\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x75\x72\x20\x3d\x20\x63\x74\x78\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x73\x65\x67\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x26\x26\x20\x63\x75\x72\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x75\x72\x20\x3d\x20\x63\x75\x72\x5b\x73\x65\x67\x6d\x65\x6e\x74\x73\x5b\x69\x5d\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x75\x72\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x61\x76\x65\x72\x73\x65\x28\x76\x61\x6c\x75\x65\x2c\x20\x73\x65\x65\x6e\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x76\x61\x6c\x75\x65\x29\x20\x7c\x7c\x20\x76\x61\x6c\x75\x65\x5b\x22\x5f\x5f\x76\x5f\x73\x6b\x69\x70\x22\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x73\x65\x65\x6e\x20\x3d\x20\x73\x65\x65\x6e\x20\x7c\x7c\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x53\x65\x74\x28\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x73\x65\x65\x6e\x2e\x68\x61\x73\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x73\x65\x65\x6e\x2e\x61\x64\x64\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x66\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x72\x61\x76\x65\x72\x73\x65\x28\x76\x61\x6c\x75\x65\x2e\x76\x61\x6c\x75\x65\x2c\x20\x73\x65\x65\x6e\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x76\x61\x6c\x75\x65\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x76\x65\x72\x73\x65\x28\x76\x61\x6c\x75\x65\x5b\x69\x5d\x2c\x20\x73\x65\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x53\x65\x74\x28\x76\x61\x6c\x75\x65\x29\x20\x7c\x7c\x20\x69\x73\x4d\x61\x70\x24\x31\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x76\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x76\x65\x72\x73\x65\x28\x76\x2c\x20\x73\x65\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x50\x6c\x61\x69\x6e\x4f\x62\x6a\x65\x63\x74\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x76\x65\x72\x73\x65\x28\x76\x61\x6c\x75\x65\x5b\x6b\x65\x79\x5d\x2c\x20\x73\x65\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x75\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x53\x74\x61\x74\x65\x28\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x74\x61\x74\x65\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x3a\x20\x66\x61\x6c\x73\x65\x2c\x0a\x20\x20\x20\x20\x69\x73\x4c\x65\x61\x76\x69\x6e\x67\x3a\x20\x66\x61\x6c\x73\x65\x2c\x0a\x20\x20\x20\x20\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x69\x6e\x67\x3a\x20\x66\x61\x6c\x73\x65\x2c\x0a\x20\x20\x20\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x3a\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x4d\x61\x70\x28\x29\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x6f\x6e\x4d\x6f\x75\x6e\x74\x65\x64\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x73\x74\x61\x74\x65\x2e\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x20\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x73\x74\x61\x74\x65\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x69\x6e\x67\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x74\x61\x74\x65\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x20\x3d\x20\x5b\x46\x75\x6e\x63\x74\x69\x6f\x6e\x2c\x20\x41\x72\x72\x61\x79\x5d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x42\x61\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x49\x6d\x70\x6c\x20\x3d\x20\x7b\x0a\x20\x20\x6e\x61\x6d\x65\x3a\x20\x60\x42\x61\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x60\x2c\x0a\x20\x20\x70\x72\x6f\x70\x73\x3a\x20\x7b\x0a\x20\x20\x20\x20\x6d\x6f\x64\x65\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x20\x20\x61\x70\x70\x65\x61\x72\x3a\x20\x42\x6f\x6f\x6c\x65\x61\x6e\x2c\x0a\x20\x20\x20\x20\x70\x65\x72\x73\x69\x73\x74\x65\x64\x3a\x20\x42\x6f\x6f\x6c\x65\x61\x6e\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x45\x6e\x74\x65\x72\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x41\x66\x74\x65\x72\x45\x6e\x74\x65\x72\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x45\x6e\x74\x65\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x4c\x65\x61\x76\x65\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x4c\x65\x61\x76\x65\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x41\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x4c\x65\x61\x76\x65\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x41\x70\x70\x65\x61\x72\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x41\x66\x74\x65\x72\x41\x70\x70\x65\x61\x72\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x3a\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x73\x65\x74\x75\x70\x28\x70\x72\x6f\x70\x73\x2c\x20\x7b\x20\x73\x6c\x6f\x74\x73\x20\x7d\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x74\x61\x74\x65\x20\x3d\x20\x75\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x53\x74\x61\x74\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x70\x72\x65\x76\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x73\x6c\x6f\x74\x73\x2e\x64\x65\x66\x61\x75\x6c\x74\x20\x26\x26\x20\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x52\x61\x77\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x73\x6c\x6f\x74\x73\x2e\x64\x65\x66\x61\x75\x6c\x74\x28\x29\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x7c\x7c\x20\x21\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x68\x69\x6c\x64\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x30\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x63\x20\x6f\x66\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x20\x3d\x20\x63\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6d\x6f\x64\x65\x20\x7d\x20\x3d\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x74\x61\x74\x65\x2e\x69\x73\x4c\x65\x61\x76\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x6d\x70\x74\x79\x50\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x28\x63\x68\x69\x6c\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x20\x3d\x20\x67\x65\x74\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x43\x68\x69\x6c\x64\x28\x63\x68\x69\x6c\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x6d\x70\x74\x79\x50\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x28\x63\x68\x69\x6c\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6e\x74\x65\x72\x48\x6f\x6f\x6b\x73\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x69\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x2c\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x2c\x20\x73\x74\x61\x74\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x69\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x2c\x20\x65\x6e\x74\x65\x72\x48\x6f\x6f\x6b\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6c\x64\x43\x68\x69\x6c\x64\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6c\x64\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x20\x3d\x20\x6f\x6c\x64\x43\x68\x69\x6c\x64\x20\x26\x26\x20\x67\x65\x74\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x43\x68\x69\x6c\x64\x28\x6f\x6c\x64\x43\x68\x69\x6c\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x43\x68\x61\x6e\x67\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x20\x7d\x20\x3d\x20\x69\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x2e\x74\x79\x70\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x3d\x20\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x20\x3d\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x65\x76\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x20\x3d\x20\x6b\x65\x79\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x21\x3d\x3d\x20\x70\x72\x65\x76\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x65\x76\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x20\x3d\x20\x6b\x65\x79\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x43\x68\x61\x6e\x67\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x6c\x64\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x20\x26\x26\x20\x6f\x6c\x64\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x20\x26\x26\x20\x28\x21\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x69\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x2c\x20\x6f\x6c\x64\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x29\x20\x7c\x7c\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x4b\x65\x79\x43\x68\x61\x6e\x67\x65\x64\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x65\x61\x76\x69\x6e\x67\x48\x6f\x6f\x6b\x73\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x6f\x6c\x64\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x2c\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x2c\x20\x73\x74\x61\x74\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x6f\x6c\x64\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x2c\x20\x6c\x65\x61\x76\x69\x6e\x67\x48\x6f\x6f\x6b\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6d\x6f\x64\x65\x20\x3d\x3d\x3d\x20\x22\x6f\x75\x74\x2d\x69\x6e\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x61\x74\x65\x2e\x69\x73\x4c\x65\x61\x76\x69\x6e\x67\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x61\x76\x69\x6e\x67\x48\x6f\x6f\x6b\x73\x2e\x61\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x61\x74\x65\x2e\x69\x73\x4c\x65\x61\x76\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x75\x70\x64\x61\x74\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x6d\x70\x74\x79\x50\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x28\x63\x68\x69\x6c\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6d\x6f\x64\x65\x20\x3d\x3d\x3d\x20\x22\x69\x6e\x2d\x6f\x75\x74\x22\x20\x26\x26\x20\x69\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x61\x76\x69\x6e\x67\x48\x6f\x6f\x6b\x73\x2e\x64\x65\x6c\x61\x79\x4c\x65\x61\x76\x65\x20\x3d\x20\x28\x65\x6c\x2c\x20\x65\x61\x72\x6c\x79\x52\x65\x6d\x6f\x76\x65\x2c\x20\x64\x65\x6c\x61\x79\x65\x64\x4c\x65\x61\x76\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x20\x3d\x20\x67\x65\x74\x4c\x65\x61\x76\x69\x6e\x67\x4e\x6f\x64\x65\x73\x46\x6f\x72\x54\x79\x70\x65\x28\x73\x74\x61\x74\x65\x2c\x20\x6f\x6c\x64\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x5b\x53\x74\x72\x69\x6e\x67\x28\x6f\x6c\x64\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x2e\x6b\x65\x79\x29\x5d\x20\x3d\x20\x6f\x6c\x64\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x6c\x65\x61\x76\x65\x43\x62\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x61\x72\x6c\x79\x52\x65\x6d\x6f\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x6c\x65\x61\x76\x65\x43\x62\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x20\x65\x6e\x74\x65\x72\x48\x6f\x6f\x6b\x73\x2e\x64\x65\x6c\x61\x79\x65\x64\x4c\x65\x61\x76\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6e\x74\x65\x72\x48\x6f\x6f\x6b\x73\x2e\x64\x65\x6c\x61\x79\x65\x64\x4c\x65\x61\x76\x65\x20\x3d\x20\x64\x65\x6c\x61\x79\x65\x64\x4c\x65\x61\x76\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x68\x69\x6c\x64\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x42\x61\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x3d\x20\x42\x61\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x49\x6d\x70\x6c\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x4c\x65\x61\x76\x69\x6e\x67\x4e\x6f\x64\x65\x73\x46\x6f\x72\x54\x79\x70\x65\x28\x73\x74\x61\x74\x65\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x20\x7d\x20\x3d\x20\x73\x74\x61\x74\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x20\x3d\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x2e\x67\x65\x74\x28\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x2e\x73\x65\x74\x28\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2c\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x76\x6e\x6f\x64\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x73\x74\x61\x74\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x61\x70\x70\x65\x61\x72\x2c\x20\x6d\x6f\x64\x65\x2c\x20\x70\x65\x72\x73\x69\x73\x74\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x2c\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x2c\x20\x6f\x6e\x45\x6e\x74\x65\x72\x2c\x20\x6f\x6e\x41\x66\x74\x65\x72\x45\x6e\x74\x65\x72\x2c\x20\x6f\x6e\x45\x6e\x74\x65\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x2c\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x4c\x65\x61\x76\x65\x2c\x20\x6f\x6e\x4c\x65\x61\x76\x65\x2c\x20\x6f\x6e\x41\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x2c\x20\x6f\x6e\x4c\x65\x61\x76\x65\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x2c\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x41\x70\x70\x65\x61\x72\x2c\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x2c\x20\x6f\x6e\x41\x66\x74\x65\x72\x41\x70\x70\x65\x61\x72\x2c\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x20\x7d\x20\x3d\x20\x70\x72\x6f\x70\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x3d\x20\x53\x74\x72\x69\x6e\x67\x28\x76\x6e\x6f\x64\x65\x2e\x6b\x65\x79\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x20\x3d\x20\x67\x65\x74\x4c\x65\x61\x76\x69\x6e\x67\x4e\x6f\x64\x65\x73\x46\x6f\x72\x54\x79\x70\x65\x28\x73\x74\x61\x74\x65\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x32\x20\x3d\x20\x28\x68\x6f\x6f\x6b\x2c\x20\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x68\x6f\x6f\x6b\x20\x26\x26\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x68\x6f\x6f\x6b\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x39\x2c\x20\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x6c\x6c\x41\x73\x79\x6e\x63\x48\x6f\x6f\x6b\x20\x3d\x20\x28\x68\x6f\x6f\x6b\x2c\x20\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x6f\x6e\x65\x20\x3d\x20\x61\x72\x67\x73\x5b\x31\x5d\x3b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x32\x28\x68\x6f\x6f\x6b\x2c\x20\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x68\x6f\x6f\x6b\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x68\x6f\x6f\x6b\x2e\x65\x76\x65\x72\x79\x28\x28\x68\x6f\x6f\x6b\x32\x29\x20\x3d\x3e\x20\x68\x6f\x6f\x6b\x32\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3c\x3d\x20\x31\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6f\x6e\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x68\x6f\x6f\x6b\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3c\x3d\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x64\x6f\x6e\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x6f\x6f\x6b\x73\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x6d\x6f\x64\x65\x2c\x0a\x20\x20\x20\x20\x70\x65\x72\x73\x69\x73\x74\x65\x64\x2c\x0a\x20\x20\x20\x20\x62\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x28\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x68\x6f\x6f\x6b\x20\x3d\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x73\x74\x61\x74\x65\x2e\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x61\x70\x70\x65\x61\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x6f\x6b\x20\x3d\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x41\x70\x70\x65\x61\x72\x20\x7c\x7c\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x5f\x6c\x65\x61\x76\x65\x43\x62\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x6c\x65\x61\x76\x65\x43\x62\x28\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x20\x3d\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x20\x26\x26\x20\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x29\x20\x26\x26\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x2e\x65\x6c\x2e\x5f\x6c\x65\x61\x76\x65\x43\x62\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x2e\x65\x6c\x2e\x5f\x6c\x65\x61\x76\x65\x43\x62\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x32\x28\x68\x6f\x6f\x6b\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x65\x6e\x74\x65\x72\x28\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x68\x6f\x6f\x6b\x20\x3d\x20\x6f\x6e\x45\x6e\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x61\x66\x74\x65\x72\x48\x6f\x6f\x6b\x20\x3d\x20\x6f\x6e\x41\x66\x74\x65\x72\x45\x6e\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x61\x6e\x63\x65\x6c\x48\x6f\x6f\x6b\x20\x3d\x20\x6f\x6e\x45\x6e\x74\x65\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x73\x74\x61\x74\x65\x2e\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x61\x70\x70\x65\x61\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x6f\x6b\x20\x3d\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x20\x7c\x7c\x20\x6f\x6e\x45\x6e\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x66\x74\x65\x72\x48\x6f\x6f\x6b\x20\x3d\x20\x6f\x6e\x41\x66\x74\x65\x72\x41\x70\x70\x65\x61\x72\x20\x7c\x7c\x20\x6f\x6e\x41\x66\x74\x65\x72\x45\x6e\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6e\x63\x65\x6c\x48\x6f\x6f\x6b\x20\x3d\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x20\x7c\x7c\x20\x6f\x6e\x45\x6e\x74\x65\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x61\x6c\x6c\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x6f\x6e\x65\x20\x3d\x20\x65\x6c\x2e\x5f\x65\x6e\x74\x65\x72\x43\x62\x20\x3d\x20\x28\x63\x61\x6e\x63\x65\x6c\x6c\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x61\x6c\x6c\x65\x64\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x61\x6e\x63\x65\x6c\x6c\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x32\x28\x63\x61\x6e\x63\x65\x6c\x48\x6f\x6f\x6b\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x32\x28\x61\x66\x74\x65\x72\x48\x6f\x6f\x6b\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x68\x6f\x6f\x6b\x73\x2e\x64\x65\x6c\x61\x79\x65\x64\x4c\x65\x61\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x6f\x6b\x73\x2e\x64\x65\x6c\x61\x79\x65\x64\x4c\x65\x61\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x65\x6e\x74\x65\x72\x43\x62\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x68\x6f\x6f\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x41\x73\x79\x6e\x63\x48\x6f\x6f\x6b\x28\x68\x6f\x6f\x6b\x2c\x20\x5b\x65\x6c\x2c\x20\x64\x6f\x6e\x65\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6f\x6e\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x6c\x65\x61\x76\x65\x28\x65\x6c\x2c\x20\x72\x65\x6d\x6f\x76\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x32\x20\x3d\x20\x53\x74\x72\x69\x6e\x67\x28\x76\x6e\x6f\x64\x65\x2e\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x5f\x65\x6e\x74\x65\x72\x43\x62\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x65\x6e\x74\x65\x72\x43\x62\x28\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x74\x61\x74\x65\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x6d\x6f\x76\x65\x32\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x32\x28\x6f\x6e\x42\x65\x66\x6f\x72\x65\x4c\x65\x61\x76\x65\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x61\x6c\x6c\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x6f\x6e\x65\x20\x3d\x20\x65\x6c\x2e\x5f\x6c\x65\x61\x76\x65\x43\x62\x20\x3d\x20\x28\x63\x61\x6e\x63\x65\x6c\x6c\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x61\x6c\x6c\x65\x64\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x32\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x61\x6e\x63\x65\x6c\x6c\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x32\x28\x6f\x6e\x4c\x65\x61\x76\x65\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x32\x28\x6f\x6e\x41\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x6c\x65\x61\x76\x65\x43\x62\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x32\x5d\x20\x3d\x3d\x3d\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x32\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x61\x76\x69\x6e\x67\x56\x4e\x6f\x64\x65\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x32\x5d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x6e\x4c\x65\x61\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x41\x73\x79\x6e\x63\x48\x6f\x6f\x6b\x28\x6f\x6e\x4c\x65\x61\x76\x65\x2c\x20\x5b\x65\x6c\x2c\x20\x64\x6f\x6e\x65\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6f\x6e\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x63\x6c\x6f\x6e\x65\x28\x76\x6e\x6f\x64\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x76\x6e\x6f\x64\x65\x32\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x73\x74\x61\x74\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x6f\x6f\x6b\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x65\x6d\x70\x74\x79\x50\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x28\x76\x6e\x6f\x64\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x43\x68\x69\x6c\x64\x28\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x28\x76\x6e\x6f\x64\x65\x29\x20\x3f\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3f\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x30\x5d\x20\x3a\x20\x76\x6f\x69\x64\x20\x30\x20\x3a\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x76\x6e\x6f\x64\x65\x2c\x20\x68\x6f\x6f\x6b\x73\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x73\x75\x62\x54\x72\x65\x65\x2c\x20\x68\x6f\x6f\x6b\x73\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x3d\x20\x68\x6f\x6f\x6b\x73\x2e\x63\x6c\x6f\x6e\x65\x28\x76\x6e\x6f\x64\x65\x2e\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x46\x61\x6c\x6c\x62\x61\x63\x6b\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x3d\x20\x68\x6f\x6f\x6b\x73\x2e\x63\x6c\x6f\x6e\x65\x28\x76\x6e\x6f\x64\x65\x2e\x73\x73\x46\x61\x6c\x6c\x62\x61\x63\x6b\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x3d\x20\x68\x6f\x6f\x6b\x73\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x52\x61\x77\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x6b\x65\x65\x70\x43\x6f\x6d\x6d\x65\x6e\x74\x20\x3d\x20\x66\x61\x6c\x73\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x4b\x65\x79\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x72\x65\x74\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x6c\x65\x74\x20\x6b\x65\x79\x65\x64\x46\x72\x61\x67\x6d\x65\x6e\x74\x43\x6f\x75\x6e\x74\x20\x3d\x20\x30\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x68\x69\x6c\x64\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x4b\x65\x79\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x63\x68\x69\x6c\x64\x2e\x6b\x65\x79\x20\x3a\x20\x53\x74\x72\x69\x6e\x67\x28\x70\x61\x72\x65\x6e\x74\x4b\x65\x79\x29\x20\x2b\x20\x53\x74\x72\x69\x6e\x67\x28\x63\x68\x69\x6c\x64\x2e\x6b\x65\x79\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x63\x68\x69\x6c\x64\x2e\x6b\x65\x79\x20\x3a\x20\x69\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x2e\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6b\x65\x79\x65\x64\x46\x72\x61\x67\x6d\x65\x6e\x74\x43\x6f\x75\x6e\x74\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x20\x3d\x20\x72\x65\x74\x2e\x63\x6f\x6e\x63\x61\x74\x28\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x52\x61\x77\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x68\x69\x6c\x64\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x6b\x65\x65\x70\x43\x6f\x6d\x6d\x65\x6e\x74\x2c\x20\x6b\x65\x79\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x65\x70\x43\x6f\x6d\x6d\x65\x6e\x74\x20\x7c\x7c\x20\x63\x68\x69\x6c\x64\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x2e\x70\x75\x73\x68\x28\x6b\x65\x79\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x28\x63\x68\x69\x6c\x64\x2c\x20\x7b\x20\x6b\x65\x79\x20\x7d\x29\x20\x3a\x20\x63\x68\x69\x6c\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x65\x64\x46\x72\x61\x67\x6d\x65\x6e\x74\x43\x6f\x75\x6e\x74\x20\x3e\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x72\x65\x74\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x5b\x69\x5d\x2e\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3d\x20\x2d\x32\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x64\x65\x66\x69\x6e\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x3f\x20\x7b\x20\x73\x65\x74\x75\x70\x3a\x20\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x6e\x61\x6d\x65\x3a\x20\x6f\x70\x74\x69\x6f\x6e\x73\x2e\x6e\x61\x6d\x65\x20\x7d\x20\x3a\x20\x6f\x70\x74\x69\x6f\x6e\x73\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x20\x3d\x20\x28\x69\x29\x20\x3d\x3e\x20\x21\x21\x69\x2e\x74\x79\x70\x65\x2e\x5f\x5f\x61\x73\x79\x6e\x63\x4c\x6f\x61\x64\x65\x72\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x64\x65\x66\x69\x6e\x65\x41\x73\x79\x6e\x63\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x73\x6f\x75\x72\x63\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x73\x6f\x75\x72\x63\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x6f\x75\x72\x63\x65\x20\x3d\x20\x7b\x20\x6c\x6f\x61\x64\x65\x72\x3a\x20\x73\x6f\x75\x72\x63\x65\x20\x7d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x0a\x20\x20\x20\x20\x6c\x6f\x61\x64\x65\x72\x2c\x0a\x20\x20\x20\x20\x6c\x6f\x61\x64\x69\x6e\x67\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x20\x20\x65\x72\x72\x6f\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x20\x20\x64\x65\x6c\x61\x79\x20\x3d\x20\x32\x30\x30\x2c\x0a\x20\x20\x20\x20\x74\x69\x6d\x65\x6f\x75\x74\x2c\x0a\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x69\x62\x6c\x65\x20\x3d\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x45\x72\x72\x6f\x72\x3a\x20\x75\x73\x65\x72\x4f\x6e\x45\x72\x72\x6f\x72\x0a\x20\x20\x7d\x20\x3d\x20\x73\x6f\x75\x72\x63\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x70\x65\x6e\x64\x69\x6e\x67\x52\x65\x71\x75\x65\x73\x74\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x6c\x65\x74\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x43\x6f\x6d\x70\x3b\x0a\x20\x20\x6c\x65\x74\x20\x72\x65\x74\x72\x69\x65\x73\x20\x3d\x20\x30\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x74\x72\x79\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x72\x69\x65\x73\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x70\x65\x6e\x64\x69\x6e\x67\x52\x65\x71\x75\x65\x73\x74\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6c\x6f\x61\x64\x28\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x6f\x61\x64\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x74\x68\x69\x73\x52\x65\x71\x75\x65\x73\x74\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x65\x6e\x64\x69\x6e\x67\x52\x65\x71\x75\x65\x73\x74\x20\x7c\x7c\x20\x28\x74\x68\x69\x73\x52\x65\x71\x75\x65\x73\x74\x20\x3d\x20\x70\x65\x6e\x64\x69\x6e\x67\x52\x65\x71\x75\x65\x73\x74\x20\x3d\x20\x6c\x6f\x61\x64\x65\x72\x28\x29\x2e\x63\x61\x74\x63\x68\x28\x28\x65\x72\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x72\x72\x20\x3d\x20\x65\x72\x72\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x6f\x66\x20\x45\x72\x72\x6f\x72\x20\x3f\x20\x65\x72\x72\x20\x3a\x20\x6e\x65\x77\x20\x45\x72\x72\x6f\x72\x28\x53\x74\x72\x69\x6e\x67\x28\x65\x72\x72\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x75\x73\x65\x72\x4f\x6e\x45\x72\x72\x6f\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x77\x20\x50\x72\x6f\x6d\x69\x73\x65\x28\x28\x72\x65\x73\x6f\x6c\x76\x65\x32\x2c\x20\x72\x65\x6a\x65\x63\x74\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x75\x73\x65\x72\x52\x65\x74\x72\x79\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x28\x72\x65\x74\x72\x79\x28\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x75\x73\x65\x72\x46\x61\x69\x6c\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x72\x65\x6a\x65\x63\x74\x28\x65\x72\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x75\x73\x65\x72\x4f\x6e\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x2c\x20\x75\x73\x65\x72\x52\x65\x74\x72\x79\x2c\x20\x75\x73\x65\x72\x46\x61\x69\x6c\x2c\x20\x72\x65\x74\x72\x69\x65\x73\x20\x2b\x20\x31\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x72\x6f\x77\x20\x65\x72\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x29\x2e\x74\x68\x65\x6e\x28\x28\x63\x6f\x6d\x70\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x68\x69\x73\x52\x65\x71\x75\x65\x73\x74\x20\x21\x3d\x3d\x20\x70\x65\x6e\x64\x69\x6e\x67\x52\x65\x71\x75\x65\x73\x74\x20\x26\x26\x20\x70\x65\x6e\x64\x69\x6e\x67\x52\x65\x71\x75\x65\x73\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x65\x6e\x64\x69\x6e\x67\x52\x65\x71\x75\x65\x73\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6f\x6d\x70\x20\x26\x26\x20\x28\x63\x6f\x6d\x70\x2e\x5f\x5f\x65\x73\x4d\x6f\x64\x75\x6c\x65\x20\x7c\x7c\x20\x63\x6f\x6d\x70\x5b\x53\x79\x6d\x62\x6f\x6c\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x54\x61\x67\x5d\x20\x3d\x3d\x3d\x20\x22\x4d\x6f\x64\x75\x6c\x65\x22\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6d\x70\x20\x3d\x20\x63\x6f\x6d\x70\x2e\x64\x65\x66\x61\x75\x6c\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x43\x6f\x6d\x70\x20\x3d\x20\x63\x6f\x6d\x70\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6f\x6d\x70\x3b\x0a\x20\x20\x20\x20\x7d\x29\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x65\x66\x69\x6e\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x7b\x0a\x20\x20\x20\x20\x6e\x61\x6d\x65\x3a\x20\x22\x41\x73\x79\x6e\x63\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x57\x72\x61\x70\x70\x65\x72\x22\x2c\x0a\x20\x20\x20\x20\x5f\x5f\x61\x73\x79\x6e\x63\x4c\x6f\x61\x64\x65\x72\x3a\x20\x6c\x6f\x61\x64\x2c\x0a\x20\x20\x20\x20\x67\x65\x74\x20\x5f\x5f\x61\x73\x79\x6e\x63\x52\x65\x73\x6f\x6c\x76\x65\x64\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x43\x6f\x6d\x70\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x73\x65\x74\x75\x70\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x72\x65\x73\x6f\x6c\x76\x65\x64\x43\x6f\x6d\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x29\x20\x3d\x3e\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x6e\x65\x72\x43\x6f\x6d\x70\x28\x72\x65\x73\x6f\x6c\x76\x65\x64\x43\x6f\x6d\x70\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x45\x72\x72\x6f\x72\x20\x3d\x20\x28\x65\x72\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x65\x6e\x64\x69\x6e\x67\x52\x65\x71\x75\x65\x73\x74\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x6e\x64\x6c\x65\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x31\x33\x2c\x20\x21\x65\x72\x72\x6f\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x69\x62\x6c\x65\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x7c\x7c\x20\x69\x73\x49\x6e\x53\x53\x52\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x53\x65\x74\x75\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6c\x6f\x61\x64\x28\x29\x2e\x74\x68\x65\x6e\x28\x28\x63\x6f\x6d\x70\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x29\x20\x3d\x3e\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x6e\x65\x72\x43\x6f\x6d\x70\x28\x63\x6f\x6d\x70\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x2e\x63\x61\x74\x63\x68\x28\x28\x65\x72\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x6e\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x29\x20\x3d\x3e\x20\x65\x72\x72\x6f\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3f\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x65\x72\x72\x6f\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x72\x72\x6f\x72\x3a\x20\x65\x72\x72\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x20\x3a\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x6f\x61\x64\x65\x64\x20\x3d\x20\x72\x65\x66\x28\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x72\x72\x6f\x72\x20\x3d\x20\x72\x65\x66\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x65\x6c\x61\x79\x65\x64\x20\x3d\x20\x72\x65\x66\x28\x21\x21\x64\x65\x6c\x61\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x65\x6c\x61\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x54\x69\x6d\x65\x6f\x75\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x61\x79\x65\x64\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x64\x65\x6c\x61\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x69\x6d\x65\x6f\x75\x74\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x54\x69\x6d\x65\x6f\x75\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x6c\x6f\x61\x64\x65\x64\x2e\x76\x61\x6c\x75\x65\x20\x26\x26\x20\x21\x65\x72\x72\x6f\x72\x2e\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x72\x72\x20\x3d\x20\x6e\x65\x77\x20\x45\x72\x72\x6f\x72\x28\x60\x41\x73\x79\x6e\x63\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x74\x69\x6d\x65\x64\x20\x6f\x75\x74\x20\x61\x66\x74\x65\x72\x20\x24\x7b\x74\x69\x6d\x65\x6f\x75\x74\x7d\x6d\x73\x2e\x60\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x6e\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x72\x72\x6f\x72\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x65\x72\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x74\x69\x6d\x65\x6f\x75\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x6c\x6f\x61\x64\x28\x29\x2e\x74\x68\x65\x6e\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x6f\x61\x64\x65\x64\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x20\x26\x26\x20\x69\x73\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x2e\x76\x6e\x6f\x64\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x4a\x6f\x62\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x2e\x75\x70\x64\x61\x74\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x2e\x63\x61\x74\x63\x68\x28\x28\x65\x72\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x6e\x45\x72\x72\x6f\x72\x28\x65\x72\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x72\x72\x6f\x72\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x65\x72\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6c\x6f\x61\x64\x65\x64\x2e\x76\x61\x6c\x75\x65\x20\x26\x26\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x43\x6f\x6d\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x6e\x65\x72\x43\x6f\x6d\x70\x28\x72\x65\x73\x6f\x6c\x76\x65\x64\x43\x6f\x6d\x70\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x65\x72\x72\x6f\x72\x2e\x76\x61\x6c\x75\x65\x20\x26\x26\x20\x65\x72\x72\x6f\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x65\x72\x72\x6f\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x72\x72\x6f\x72\x3a\x20\x65\x72\x72\x6f\x72\x2e\x76\x61\x6c\x75\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6c\x6f\x61\x64\x69\x6e\x67\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x26\x26\x20\x21\x64\x65\x6c\x61\x79\x65\x64\x2e\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x6c\x6f\x61\x64\x69\x6e\x67\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x6e\x65\x72\x43\x6f\x6d\x70\x28\x63\x6f\x6d\x70\x2c\x20\x7b\x20\x76\x6e\x6f\x64\x65\x3a\x20\x7b\x20\x72\x65\x66\x3a\x20\x72\x65\x66\x32\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x7d\x2c\x20\x70\x61\x72\x65\x6e\x74\x20\x7d\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x63\x6f\x6d\x70\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x76\x6e\x6f\x64\x65\x2e\x72\x65\x66\x20\x3d\x20\x72\x65\x66\x32\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2e\x5f\x5f\x69\x73\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x49\x6d\x70\x6c\x20\x3d\x20\x7b\x0a\x20\x20\x6e\x61\x6d\x65\x3a\x20\x60\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x60\x2c\x0a\x20\x20\x5f\x5f\x69\x73\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x70\x72\x6f\x70\x73\x3a\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x63\x6c\x75\x64\x65\x3a\x20\x5b\x53\x74\x72\x69\x6e\x67\x2c\x20\x52\x65\x67\x45\x78\x70\x2c\x20\x41\x72\x72\x61\x79\x5d\x2c\x0a\x20\x20\x20\x20\x65\x78\x63\x6c\x75\x64\x65\x3a\x20\x5b\x53\x74\x72\x69\x6e\x67\x2c\x20\x52\x65\x67\x45\x78\x70\x2c\x20\x41\x72\x72\x61\x79\x5d\x2c\x0a\x20\x20\x20\x20\x6d\x61\x78\x3a\x20\x5b\x53\x74\x72\x69\x6e\x67\x2c\x20\x4e\x75\x6d\x62\x65\x72\x5d\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x73\x65\x74\x75\x70\x28\x70\x72\x6f\x70\x73\x2c\x20\x7b\x20\x73\x6c\x6f\x74\x73\x20\x7d\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x72\x65\x64\x43\x6f\x6e\x74\x65\x78\x74\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x63\x74\x78\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x73\x68\x61\x72\x65\x64\x43\x6f\x6e\x74\x65\x78\x74\x2e\x72\x65\x6e\x64\x65\x72\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x73\x6c\x6f\x74\x73\x2e\x64\x65\x66\x61\x75\x6c\x74\x20\x26\x26\x20\x73\x6c\x6f\x74\x73\x2e\x64\x65\x66\x61\x75\x6c\x74\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x26\x26\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x3d\x3d\x20\x31\x20\x3f\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x30\x5d\x20\x3a\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x4d\x61\x70\x28\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x53\x65\x74\x28\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x3a\x20\x7b\x20\x70\x3a\x20\x70\x61\x74\x63\x68\x2c\x20\x6d\x3a\x20\x6d\x6f\x76\x65\x2c\x20\x75\x6d\x3a\x20\x5f\x75\x6e\x6d\x6f\x75\x6e\x74\x2c\x20\x6f\x3a\x20\x7b\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x20\x7d\x20\x7d\x20\x7d\x20\x3d\x20\x73\x68\x61\x72\x65\x64\x43\x6f\x6e\x74\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x74\x6f\x72\x61\x67\x65\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x28\x22\x64\x69\x76\x22\x29\x3b\x0a\x20\x20\x20\x20\x73\x68\x61\x72\x65\x64\x43\x6f\x6e\x74\x65\x78\x74\x2e\x61\x63\x74\x69\x76\x61\x74\x65\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x30\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x2e\x76\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x2e\x69\x73\x44\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x2e\x61\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x41\x72\x72\x61\x79\x46\x6e\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x2e\x61\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x4d\x6f\x75\x6e\x74\x65\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x2e\x70\x61\x72\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x73\x68\x61\x72\x65\x64\x43\x6f\x6e\x74\x65\x78\x74\x2e\x64\x65\x61\x63\x74\x69\x76\x61\x74\x65\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x73\x74\x6f\x72\x61\x67\x65\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x31\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x2e\x64\x61\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x41\x72\x72\x61\x79\x46\x6e\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x2e\x64\x61\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x2e\x70\x61\x72\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x32\x2e\x69\x73\x44\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x65\x74\x53\x68\x61\x70\x65\x46\x6c\x61\x67\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x5f\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x76\x6e\x6f\x64\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x72\x75\x6e\x65\x43\x61\x63\x68\x65\x28\x66\x69\x6c\x74\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x63\x68\x65\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6b\x65\x79\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x61\x6d\x65\x20\x3d\x20\x67\x65\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4e\x61\x6d\x65\x28\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x61\x6d\x65\x20\x26\x26\x20\x28\x21\x66\x69\x6c\x74\x65\x72\x20\x7c\x7c\x20\x21\x66\x69\x6c\x74\x65\x72\x28\x6e\x61\x6d\x65\x29\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x75\x6e\x65\x43\x61\x63\x68\x65\x45\x6e\x74\x72\x79\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x72\x75\x6e\x65\x43\x61\x63\x68\x65\x45\x6e\x74\x72\x79\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x64\x20\x3d\x20\x63\x61\x63\x68\x65\x2e\x67\x65\x74\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x63\x75\x72\x72\x65\x6e\x74\x20\x7c\x7c\x20\x63\x61\x63\x68\x65\x64\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x2e\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x63\x61\x63\x68\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x63\x75\x72\x72\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x73\x65\x74\x53\x68\x61\x70\x65\x46\x6c\x61\x67\x28\x63\x75\x72\x72\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x63\x68\x65\x2e\x64\x65\x6c\x65\x74\x65\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6b\x65\x79\x73\x2e\x64\x65\x6c\x65\x74\x65\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x77\x61\x74\x63\x68\x28\x28\x29\x20\x3d\x3e\x20\x5b\x70\x72\x6f\x70\x73\x2e\x69\x6e\x63\x6c\x75\x64\x65\x2c\x20\x70\x72\x6f\x70\x73\x2e\x65\x78\x63\x6c\x75\x64\x65\x5d\x2c\x20\x28\x5b\x69\x6e\x63\x6c\x75\x64\x65\x2c\x20\x65\x78\x63\x6c\x75\x64\x65\x5d\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x63\x6c\x75\x64\x65\x20\x26\x26\x20\x70\x72\x75\x6e\x65\x43\x61\x63\x68\x65\x28\x28\x6e\x61\x6d\x65\x29\x20\x3d\x3e\x20\x6d\x61\x74\x63\x68\x65\x73\x28\x69\x6e\x63\x6c\x75\x64\x65\x2c\x20\x6e\x61\x6d\x65\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x78\x63\x6c\x75\x64\x65\x20\x26\x26\x20\x70\x72\x75\x6e\x65\x43\x61\x63\x68\x65\x28\x28\x6e\x61\x6d\x65\x29\x20\x3d\x3e\x20\x21\x6d\x61\x74\x63\x68\x65\x73\x28\x65\x78\x63\x6c\x75\x64\x65\x2c\x20\x6e\x61\x6d\x65\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x20\x7b\x20\x66\x6c\x75\x73\x68\x3a\x20\x22\x70\x6f\x73\x74\x22\x2c\x20\x64\x65\x65\x70\x3a\x20\x74\x72\x75\x65\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x70\x65\x6e\x64\x69\x6e\x67\x43\x61\x63\x68\x65\x4b\x65\x79\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x53\x75\x62\x74\x72\x65\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x65\x6e\x64\x69\x6e\x67\x43\x61\x63\x68\x65\x4b\x65\x79\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x63\x68\x65\x2e\x73\x65\x74\x28\x70\x65\x6e\x64\x69\x6e\x67\x43\x61\x63\x68\x65\x4b\x65\x79\x2c\x20\x67\x65\x74\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x6f\x6e\x4d\x6f\x75\x6e\x74\x65\x64\x28\x63\x61\x63\x68\x65\x53\x75\x62\x74\x72\x65\x65\x29\x3b\x0a\x20\x20\x20\x20\x6f\x6e\x55\x70\x64\x61\x74\x65\x64\x28\x63\x61\x63\x68\x65\x53\x75\x62\x74\x72\x65\x65\x29\x3b\x0a\x20\x20\x20\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x63\x68\x65\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x63\x61\x63\x68\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x73\x75\x62\x54\x72\x65\x65\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x67\x65\x74\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x28\x73\x75\x62\x54\x72\x65\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x61\x63\x68\x65\x64\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x73\x65\x74\x53\x68\x61\x70\x65\x46\x6c\x61\x67\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x61\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x64\x61\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x61\x20\x26\x26\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x64\x61\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x63\x61\x63\x68\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x65\x6e\x64\x69\x6e\x67\x43\x61\x63\x68\x65\x4b\x65\x79\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x73\x6c\x6f\x74\x73\x2e\x64\x65\x66\x61\x75\x6c\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x73\x6c\x6f\x74\x73\x2e\x64\x65\x66\x61\x75\x6c\x74\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x56\x4e\x6f\x64\x65\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x30\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x69\x73\x56\x4e\x6f\x64\x65\x28\x72\x61\x77\x56\x4e\x6f\x64\x65\x29\x20\x7c\x7c\x20\x21\x28\x72\x61\x77\x56\x4e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x34\x29\x20\x26\x26\x20\x21\x28\x72\x61\x77\x56\x4e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x56\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x67\x65\x74\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x28\x72\x61\x77\x56\x4e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6d\x70\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x61\x6d\x65\x20\x3d\x20\x67\x65\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4e\x61\x6d\x65\x28\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x20\x3f\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2e\x5f\x5f\x61\x73\x79\x6e\x63\x52\x65\x73\x6f\x6c\x76\x65\x64\x20\x7c\x7c\x20\x7b\x7d\x20\x3a\x20\x63\x6f\x6d\x70\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x69\x6e\x63\x6c\x75\x64\x65\x2c\x20\x65\x78\x63\x6c\x75\x64\x65\x2c\x20\x6d\x61\x78\x20\x7d\x20\x3d\x20\x70\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x63\x6c\x75\x64\x65\x20\x26\x26\x20\x28\x21\x6e\x61\x6d\x65\x20\x7c\x7c\x20\x21\x6d\x61\x74\x63\x68\x65\x73\x28\x69\x6e\x63\x6c\x75\x64\x65\x2c\x20\x6e\x61\x6d\x65\x29\x29\x20\x7c\x7c\x20\x65\x78\x63\x6c\x75\x64\x65\x20\x26\x26\x20\x6e\x61\x6d\x65\x20\x26\x26\x20\x6d\x61\x74\x63\x68\x65\x73\x28\x65\x78\x63\x6c\x75\x64\x65\x2c\x20\x6e\x61\x6d\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x56\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x6b\x65\x79\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x63\x6f\x6d\x70\x20\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x6b\x65\x79\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x64\x56\x4e\x6f\x64\x65\x20\x3d\x20\x63\x61\x63\x68\x65\x2e\x67\x65\x74\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x72\x61\x77\x56\x4e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x61\x77\x56\x4e\x6f\x64\x65\x2e\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x70\x65\x6e\x64\x69\x6e\x67\x43\x61\x63\x68\x65\x4b\x65\x79\x20\x3d\x20\x6b\x65\x79\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x61\x63\x68\x65\x64\x56\x4e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x20\x3d\x20\x63\x61\x63\x68\x65\x64\x56\x4e\x6f\x64\x65\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x63\x61\x63\x68\x65\x64\x56\x4e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x76\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x7c\x3d\x20\x35\x31\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6b\x65\x79\x73\x2e\x64\x65\x6c\x65\x74\x65\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6b\x65\x79\x73\x2e\x61\x64\x64\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6b\x65\x79\x73\x2e\x61\x64\x64\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6d\x61\x78\x20\x26\x26\x20\x6b\x65\x79\x73\x2e\x73\x69\x7a\x65\x20\x3e\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x6d\x61\x78\x2c\x20\x31\x30\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x75\x6e\x65\x43\x61\x63\x68\x65\x45\x6e\x74\x72\x79\x28\x6b\x65\x79\x73\x2e\x76\x61\x6c\x75\x65\x73\x28\x29\x2e\x6e\x65\x78\x74\x28\x29\x2e\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x7c\x3d\x20\x32\x35\x36\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x53\x75\x73\x70\x65\x6e\x73\x65\x28\x72\x61\x77\x56\x4e\x6f\x64\x65\x2e\x74\x79\x70\x65\x29\x20\x3f\x20\x72\x61\x77\x56\x4e\x6f\x64\x65\x20\x3a\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x20\x3d\x20\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x49\x6d\x70\x6c\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x61\x74\x63\x68\x65\x73\x28\x70\x61\x74\x74\x65\x72\x6e\x2c\x20\x6e\x61\x6d\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x70\x61\x74\x74\x65\x72\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x61\x74\x74\x65\x72\x6e\x2e\x73\x6f\x6d\x65\x28\x28\x70\x32\x29\x20\x3d\x3e\x20\x6d\x61\x74\x63\x68\x65\x73\x28\x70\x32\x2c\x20\x6e\x61\x6d\x65\x29\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x70\x61\x74\x74\x65\x72\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x61\x74\x74\x65\x72\x6e\x2e\x73\x70\x6c\x69\x74\x28\x22\x2c\x22\x29\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x6e\x61\x6d\x65\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x70\x61\x74\x74\x65\x72\x6e\x2e\x74\x65\x73\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x61\x74\x74\x65\x72\x6e\x2e\x74\x65\x73\x74\x28\x6e\x61\x6d\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6f\x6e\x41\x63\x74\x69\x76\x61\x74\x65\x64\x28\x68\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x48\x6f\x6f\x6b\x28\x68\x6f\x6f\x6b\x2c\x20\x22\x61\x22\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6f\x6e\x44\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x28\x68\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x48\x6f\x6f\x6b\x28\x68\x6f\x6f\x6b\x2c\x20\x22\x64\x61\x22\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x48\x6f\x6f\x6b\x28\x68\x6f\x6f\x6b\x2c\x20\x74\x79\x70\x65\x2c\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x77\x72\x61\x70\x70\x65\x64\x48\x6f\x6f\x6b\x20\x3d\x20\x68\x6f\x6f\x6b\x2e\x5f\x5f\x77\x64\x63\x20\x7c\x7c\x20\x28\x68\x6f\x6f\x6b\x2e\x5f\x5f\x77\x64\x63\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x63\x75\x72\x72\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x75\x72\x72\x65\x6e\x74\x2e\x69\x73\x44\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x6f\x6f\x6b\x28\x29\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x20\x20\x69\x6e\x6a\x65\x63\x74\x48\x6f\x6f\x6b\x28\x74\x79\x70\x65\x2c\x20\x77\x72\x61\x70\x70\x65\x64\x48\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x63\x75\x72\x72\x65\x6e\x74\x20\x26\x26\x20\x63\x75\x72\x72\x65\x6e\x74\x2e\x70\x61\x72\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x28\x63\x75\x72\x72\x65\x6e\x74\x2e\x70\x61\x72\x65\x6e\x74\x2e\x76\x6e\x6f\x64\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6a\x65\x63\x74\x54\x6f\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x52\x6f\x6f\x74\x28\x77\x72\x61\x70\x70\x65\x64\x48\x6f\x6f\x6b\x2c\x20\x74\x79\x70\x65\x2c\x20\x74\x61\x72\x67\x65\x74\x2c\x20\x63\x75\x72\x72\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x2e\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x6a\x65\x63\x74\x54\x6f\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x52\x6f\x6f\x74\x28\x68\x6f\x6f\x6b\x2c\x20\x74\x79\x70\x65\x2c\x20\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x65\x70\x41\x6c\x69\x76\x65\x52\x6f\x6f\x74\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x6a\x65\x63\x74\x65\x64\x20\x3d\x20\x69\x6e\x6a\x65\x63\x74\x48\x6f\x6f\x6b\x28\x74\x79\x70\x65\x2c\x20\x68\x6f\x6f\x6b\x2c\x20\x6b\x65\x65\x70\x41\x6c\x69\x76\x65\x52\x6f\x6f\x74\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x6f\x6e\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x28\x6b\x65\x65\x70\x41\x6c\x69\x76\x65\x52\x6f\x6f\x74\x5b\x74\x79\x70\x65\x5d\x2c\x20\x69\x6e\x6a\x65\x63\x74\x65\x64\x29\x3b\x0a\x20\x20\x7d\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x65\x74\x53\x68\x61\x70\x65\x46\x6c\x61\x67\x28\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x3b\x0a\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x32\x35\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x2d\x3d\x20\x32\x35\x36\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x35\x31\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x2d\x3d\x20\x35\x31\x32\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x3d\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x49\x6e\x6e\x65\x72\x43\x68\x69\x6c\x64\x28\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x20\x3f\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x20\x3a\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x6a\x65\x63\x74\x48\x6f\x6f\x6b\x28\x74\x79\x70\x65\x2c\x20\x68\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x70\x72\x65\x70\x65\x6e\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x6f\x6f\x6b\x73\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x5b\x74\x79\x70\x65\x5d\x20\x7c\x7c\x20\x28\x74\x61\x72\x67\x65\x74\x5b\x74\x79\x70\x65\x5d\x20\x3d\x20\x5b\x5d\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x77\x72\x61\x70\x70\x65\x64\x48\x6f\x6f\x6b\x20\x3d\x20\x68\x6f\x6f\x6b\x2e\x5f\x5f\x77\x65\x68\x20\x7c\x7c\x20\x28\x68\x6f\x6f\x6b\x2e\x5f\x5f\x77\x65\x68\x20\x3d\x20\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x75\x73\x65\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x68\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x2c\x20\x74\x79\x70\x65\x2c\x20\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x75\x6e\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x65\x74\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x70\x65\x6e\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x6f\x6b\x73\x2e\x75\x6e\x73\x68\x69\x66\x74\x28\x77\x72\x61\x70\x70\x65\x64\x48\x6f\x6f\x6b\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x6f\x6b\x73\x2e\x70\x75\x73\x68\x28\x77\x72\x61\x70\x70\x65\x64\x48\x6f\x6f\x6b\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x77\x72\x61\x70\x70\x65\x64\x48\x6f\x6f\x6b\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x63\x72\x65\x61\x74\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x28\x6c\x69\x66\x65\x63\x79\x63\x6c\x65\x29\x20\x3d\x3e\x20\x28\x68\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x3d\x3e\x20\x28\x21\x69\x73\x49\x6e\x53\x53\x52\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x53\x65\x74\x75\x70\x20\x7c\x7c\x20\x6c\x69\x66\x65\x63\x79\x63\x6c\x65\x20\x3d\x3d\x3d\x20\x22\x73\x70\x22\x29\x20\x26\x26\x20\x69\x6e\x6a\x65\x63\x74\x48\x6f\x6f\x6b\x28\x6c\x69\x66\x65\x63\x79\x63\x6c\x65\x2c\x20\x68\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x48\x6f\x6f\x6b\x28\x22\x62\x6d\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x4d\x6f\x75\x6e\x74\x65\x64\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x48\x6f\x6f\x6b\x28\x22\x6d\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x48\x6f\x6f\x6b\x28\x22\x62\x75\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x55\x70\x64\x61\x74\x65\x64\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x48\x6f\x6f\x6b\x28\x22\x75\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x48\x6f\x6f\x6b\x28\x22\x62\x75\x6d\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x48\x6f\x6f\x6b\x28\x22\x75\x6d\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x53\x65\x72\x76\x65\x72\x50\x72\x65\x66\x65\x74\x63\x68\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x48\x6f\x6f\x6b\x28\x22\x73\x70\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x52\x65\x6e\x64\x65\x72\x54\x72\x69\x67\x67\x65\x72\x65\x64\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x48\x6f\x6f\x6b\x28\x22\x72\x74\x67\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x52\x65\x6e\x64\x65\x72\x54\x72\x61\x63\x6b\x65\x64\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x48\x6f\x6f\x6b\x28\x22\x72\x74\x63\x22\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6f\x6e\x45\x72\x72\x6f\x72\x43\x61\x70\x74\x75\x72\x65\x64\x28\x68\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x69\x6e\x6a\x65\x63\x74\x48\x6f\x6f\x6b\x28\x22\x65\x63\x22\x2c\x20\x68\x6f\x6f\x6b\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x69\x74\x68\x44\x69\x72\x65\x63\x74\x69\x76\x65\x73\x28\x76\x6e\x6f\x64\x65\x2c\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x6e\x74\x65\x72\x6e\x61\x6c\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x67\x65\x74\x45\x78\x70\x6f\x73\x65\x50\x72\x6f\x78\x79\x28\x69\x6e\x74\x65\x72\x6e\x61\x6c\x49\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7c\x7c\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x78\x79\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x62\x69\x6e\x64\x69\x6e\x67\x73\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x64\x69\x72\x73\x20\x7c\x7c\x20\x28\x76\x6e\x6f\x64\x65\x2e\x64\x69\x72\x73\x20\x3d\x20\x5b\x5d\x29\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x5b\x64\x69\x72\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x61\x72\x67\x2c\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x20\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x5d\x20\x3d\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x64\x69\x72\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x64\x69\x72\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x65\x64\x3a\x20\x64\x69\x72\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x64\x3a\x20\x64\x69\x72\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x64\x69\x72\x2e\x64\x65\x65\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x76\x65\x72\x73\x65\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x62\x69\x6e\x64\x69\x6e\x67\x73\x2e\x70\x75\x73\x68\x28\x7b\x0a\x20\x20\x20\x20\x20\x20\x64\x69\x72\x2c\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x3a\x20\x76\x6f\x69\x64\x20\x30\x2c\x0a\x20\x20\x20\x20\x20\x20\x61\x72\x67\x2c\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x2c\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x6e\x61\x6d\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x62\x69\x6e\x64\x69\x6e\x67\x73\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x64\x69\x72\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6c\x64\x42\x69\x6e\x64\x69\x6e\x67\x73\x20\x3d\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x20\x26\x26\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x2e\x64\x69\x72\x73\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x62\x69\x6e\x64\x69\x6e\x67\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x62\x69\x6e\x64\x69\x6e\x67\x20\x3d\x20\x62\x69\x6e\x64\x69\x6e\x67\x73\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x6c\x64\x42\x69\x6e\x64\x69\x6e\x67\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x62\x69\x6e\x64\x69\x6e\x67\x2e\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x3d\x20\x6f\x6c\x64\x42\x69\x6e\x64\x69\x6e\x67\x73\x5b\x69\x5d\x2e\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x68\x6f\x6f\x6b\x20\x3d\x20\x62\x69\x6e\x64\x69\x6e\x67\x2e\x64\x69\x72\x5b\x6e\x61\x6d\x65\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x68\x6f\x6f\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x75\x73\x65\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x68\x6f\x6f\x6b\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x38\x2c\x20\x5b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x65\x74\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x43\x4f\x4d\x50\x4f\x4e\x45\x4e\x54\x53\x20\x3d\x20\x22\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x44\x49\x52\x45\x43\x54\x49\x56\x45\x53\x20\x3d\x20\x22\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x22\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x6e\x61\x6d\x65\x2c\x20\x6d\x61\x79\x62\x65\x53\x65\x6c\x66\x52\x65\x66\x65\x72\x65\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x41\x73\x73\x65\x74\x28\x43\x4f\x4d\x50\x4f\x4e\x45\x4e\x54\x53\x2c\x20\x6e\x61\x6d\x65\x2c\x20\x74\x72\x75\x65\x2c\x20\x6d\x61\x79\x62\x65\x53\x65\x6c\x66\x52\x65\x66\x65\x72\x65\x6e\x63\x65\x29\x20\x7c\x7c\x20\x6e\x61\x6d\x65\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x4e\x55\x4c\x4c\x5f\x44\x59\x4e\x41\x4d\x49\x43\x5f\x43\x4f\x4d\x50\x4f\x4e\x45\x4e\x54\x20\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x28\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x44\x79\x6e\x61\x6d\x69\x63\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x41\x73\x73\x65\x74\x28\x43\x4f\x4d\x50\x4f\x4e\x45\x4e\x54\x53\x2c\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x66\x61\x6c\x73\x65\x29\x20\x7c\x7c\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x7c\x7c\x20\x4e\x55\x4c\x4c\x5f\x44\x59\x4e\x41\x4d\x49\x43\x5f\x43\x4f\x4d\x50\x4f\x4e\x45\x4e\x54\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x28\x6e\x61\x6d\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x41\x73\x73\x65\x74\x28\x44\x49\x52\x45\x43\x54\x49\x56\x45\x53\x2c\x20\x6e\x61\x6d\x65\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x41\x73\x73\x65\x74\x28\x74\x79\x70\x65\x2c\x20\x6e\x61\x6d\x65\x2c\x20\x77\x61\x72\x6e\x4d\x69\x73\x73\x69\x6e\x67\x20\x3d\x20\x74\x72\x75\x65\x2c\x20\x6d\x61\x79\x62\x65\x53\x65\x6c\x66\x52\x65\x66\x65\x72\x65\x6e\x63\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x7c\x7c\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x74\x79\x70\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x43\x4f\x4d\x50\x4f\x4e\x45\x4e\x54\x53\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x6c\x66\x4e\x61\x6d\x65\x20\x3d\x20\x67\x65\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4e\x61\x6d\x65\x28\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x65\x6c\x66\x4e\x61\x6d\x65\x20\x26\x26\x20\x28\x73\x65\x6c\x66\x4e\x61\x6d\x65\x20\x3d\x3d\x3d\x20\x6e\x61\x6d\x65\x20\x7c\x7c\x20\x73\x65\x6c\x66\x4e\x61\x6d\x65\x20\x3d\x3d\x3d\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x6e\x61\x6d\x65\x29\x20\x7c\x7c\x20\x73\x65\x6c\x66\x4e\x61\x6d\x65\x20\x3d\x3d\x3d\x20\x63\x61\x70\x69\x74\x61\x6c\x69\x7a\x65\x28\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x6e\x61\x6d\x65\x29\x29\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x5b\x74\x79\x70\x65\x5d\x20\x7c\x7c\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x5b\x74\x79\x70\x65\x5d\x2c\x20\x6e\x61\x6d\x65\x29\x20\x7c\x7c\x20\x72\x65\x73\x6f\x6c\x76\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x5b\x74\x79\x70\x65\x5d\x2c\x20\x6e\x61\x6d\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x72\x65\x73\x20\x26\x26\x20\x6d\x61\x79\x62\x65\x53\x65\x6c\x66\x52\x65\x66\x65\x72\x65\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x28\x72\x65\x67\x69\x73\x74\x72\x79\x2c\x20\x6e\x61\x6d\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x67\x69\x73\x74\x72\x79\x20\x26\x26\x20\x28\x72\x65\x67\x69\x73\x74\x72\x79\x5b\x6e\x61\x6d\x65\x5d\x20\x7c\x7c\x20\x72\x65\x67\x69\x73\x74\x72\x79\x5b\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x6e\x61\x6d\x65\x29\x5d\x20\x7c\x7c\x20\x72\x65\x67\x69\x73\x74\x72\x79\x5b\x63\x61\x70\x69\x74\x61\x6c\x69\x7a\x65\x28\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x6e\x61\x6d\x65\x29\x29\x5d\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x6e\x64\x65\x72\x4c\x69\x73\x74\x28\x73\x6f\x75\x72\x63\x65\x2c\x20\x72\x65\x6e\x64\x65\x72\x49\x74\x65\x6d\x2c\x20\x63\x61\x63\x68\x65\x2c\x20\x69\x6e\x64\x65\x78\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x72\x65\x74\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x64\x20\x3d\x20\x63\x61\x63\x68\x65\x20\x26\x26\x20\x63\x61\x63\x68\x65\x5b\x69\x6e\x64\x65\x78\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x73\x6f\x75\x72\x63\x65\x29\x20\x7c\x7c\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x73\x6f\x75\x72\x63\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x20\x3d\x20\x6e\x65\x77\x20\x41\x72\x72\x61\x79\x28\x73\x6f\x75\x72\x63\x65\x2e\x6c\x65\x6e\x67\x74\x68\x29\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x2c\x20\x6c\x20\x3d\x20\x73\x6f\x75\x72\x63\x65\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x20\x3c\x20\x6c\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x5b\x69\x5d\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x49\x74\x65\x6d\x28\x73\x6f\x75\x72\x63\x65\x5b\x69\x5d\x2c\x20\x69\x2c\x20\x76\x6f\x69\x64\x20\x30\x2c\x20\x63\x61\x63\x68\x65\x64\x20\x26\x26\x20\x63\x61\x63\x68\x65\x64\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x73\x6f\x75\x72\x63\x65\x20\x3d\x3d\x3d\x20\x22\x6e\x75\x6d\x62\x65\x72\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x20\x3d\x20\x6e\x65\x77\x20\x41\x72\x72\x61\x79\x28\x73\x6f\x75\x72\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x73\x6f\x75\x72\x63\x65\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x5b\x69\x5d\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x49\x74\x65\x6d\x28\x69\x20\x2b\x20\x31\x2c\x20\x69\x2c\x20\x76\x6f\x69\x64\x20\x30\x2c\x20\x63\x61\x63\x68\x65\x64\x20\x26\x26\x20\x63\x61\x63\x68\x65\x64\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x73\x6f\x75\x72\x63\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x6f\x75\x72\x63\x65\x5b\x53\x79\x6d\x62\x6f\x6c\x2e\x69\x74\x65\x72\x61\x74\x6f\x72\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x20\x3d\x20\x41\x72\x72\x61\x79\x2e\x66\x72\x6f\x6d\x28\x73\x6f\x75\x72\x63\x65\x2c\x20\x28\x69\x74\x65\x6d\x2c\x20\x69\x29\x20\x3d\x3e\x20\x72\x65\x6e\x64\x65\x72\x49\x74\x65\x6d\x28\x69\x74\x65\x6d\x2c\x20\x69\x2c\x20\x76\x6f\x69\x64\x20\x30\x2c\x20\x63\x61\x63\x68\x65\x64\x20\x26\x26\x20\x63\x61\x63\x68\x65\x64\x5b\x69\x5d\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x73\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x73\x6f\x75\x72\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x20\x3d\x20\x6e\x65\x77\x20\x41\x72\x72\x61\x79\x28\x6b\x65\x79\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x2c\x20\x6c\x20\x3d\x20\x6b\x65\x79\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x20\x3c\x20\x6c\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x3d\x20\x6b\x65\x79\x73\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x5b\x69\x5d\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x49\x74\x65\x6d\x28\x73\x6f\x75\x72\x63\x65\x5b\x6b\x65\x79\x5d\x2c\x20\x6b\x65\x79\x2c\x20\x69\x2c\x20\x63\x61\x63\x68\x65\x64\x20\x26\x26\x20\x63\x61\x63\x68\x65\x64\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x63\x61\x63\x68\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x63\x68\x65\x5b\x69\x6e\x64\x65\x78\x5d\x20\x3d\x20\x72\x65\x74\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x53\x6c\x6f\x74\x73\x28\x73\x6c\x6f\x74\x73\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x53\x6c\x6f\x74\x73\x29\x20\x7b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x64\x79\x6e\x61\x6d\x69\x63\x53\x6c\x6f\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x6c\x6f\x74\x20\x3d\x20\x64\x79\x6e\x61\x6d\x69\x63\x53\x6c\x6f\x74\x73\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x73\x6c\x6f\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x6a\x20\x3d\x20\x30\x3b\x20\x6a\x20\x3c\x20\x73\x6c\x6f\x74\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x6a\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x6c\x6f\x74\x73\x5b\x73\x6c\x6f\x74\x5b\x6a\x5d\x2e\x6e\x61\x6d\x65\x5d\x20\x3d\x20\x73\x6c\x6f\x74\x5b\x6a\x5d\x2e\x66\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x6c\x6f\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x6c\x6f\x74\x73\x5b\x73\x6c\x6f\x74\x2e\x6e\x61\x6d\x65\x5d\x20\x3d\x20\x73\x6c\x6f\x74\x2e\x66\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x6c\x6f\x74\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x6e\x64\x65\x72\x53\x6c\x6f\x74\x28\x73\x6c\x6f\x74\x73\x2c\x20\x6e\x61\x6d\x65\x2c\x20\x70\x72\x6f\x70\x73\x20\x3d\x20\x7b\x7d\x2c\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x2c\x20\x6e\x6f\x53\x6c\x6f\x74\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x69\x73\x43\x45\x20\x7c\x7c\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x20\x26\x26\x20\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x28\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x29\x20\x26\x26\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x2e\x69\x73\x43\x45\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x22\x73\x6c\x6f\x74\x22\x2c\x20\x6e\x61\x6d\x65\x20\x3d\x3d\x3d\x20\x22\x64\x65\x66\x61\x75\x6c\x74\x22\x20\x3f\x20\x6e\x75\x6c\x6c\x20\x3a\x20\x7b\x20\x6e\x61\x6d\x65\x20\x7d\x2c\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x20\x26\x26\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x28\x29\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6c\x65\x74\x20\x73\x6c\x6f\x74\x20\x3d\x20\x73\x6c\x6f\x74\x73\x5b\x6e\x61\x6d\x65\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x73\x6c\x6f\x74\x20\x26\x26\x20\x73\x6c\x6f\x74\x2e\x5f\x63\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x6c\x6f\x74\x2e\x5f\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6f\x70\x65\x6e\x42\x6c\x6f\x63\x6b\x28\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x61\x6c\x69\x64\x53\x6c\x6f\x74\x43\x6f\x6e\x74\x65\x6e\x74\x20\x3d\x20\x73\x6c\x6f\x74\x20\x26\x26\x20\x65\x6e\x73\x75\x72\x65\x56\x61\x6c\x69\x64\x56\x4e\x6f\x64\x65\x28\x73\x6c\x6f\x74\x28\x70\x72\x6f\x70\x73\x29\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x6e\x64\x65\x72\x65\x64\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x42\x6c\x6f\x63\x6b\x28\x46\x72\x61\x67\x6d\x65\x6e\x74\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x70\x72\x6f\x70\x73\x2e\x6b\x65\x79\x20\x7c\x7c\x20\x60\x5f\x24\x7b\x6e\x61\x6d\x65\x7d\x60\x20\x7d\x2c\x20\x76\x61\x6c\x69\x64\x53\x6c\x6f\x74\x43\x6f\x6e\x74\x65\x6e\x74\x20\x7c\x7c\x20\x28\x66\x61\x6c\x6c\x62\x61\x63\x6b\x20\x3f\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x28\x29\x20\x3a\x20\x5b\x5d\x29\x2c\x20\x76\x61\x6c\x69\x64\x53\x6c\x6f\x74\x43\x6f\x6e\x74\x65\x6e\x74\x20\x26\x26\x20\x73\x6c\x6f\x74\x73\x2e\x5f\x20\x3d\x3d\x3d\x20\x31\x20\x3f\x20\x36\x34\x20\x3a\x20\x2d\x32\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x6e\x6f\x53\x6c\x6f\x74\x74\x65\x64\x20\x26\x26\x20\x72\x65\x6e\x64\x65\x72\x65\x64\x2e\x73\x63\x6f\x70\x65\x49\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x65\x64\x2e\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x20\x3d\x20\x5b\x72\x65\x6e\x64\x65\x72\x65\x64\x2e\x73\x63\x6f\x70\x65\x49\x64\x20\x2b\x20\x22\x2d\x73\x22\x5d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x73\x6c\x6f\x74\x20\x26\x26\x20\x73\x6c\x6f\x74\x2e\x5f\x63\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x6c\x6f\x74\x2e\x5f\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x6e\x64\x65\x72\x65\x64\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x65\x6e\x73\x75\x72\x65\x56\x61\x6c\x69\x64\x56\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x73\x2e\x73\x6f\x6d\x65\x28\x28\x63\x68\x69\x6c\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x56\x4e\x6f\x64\x65\x28\x63\x68\x69\x6c\x64\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x29\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x20\x26\x26\x20\x21\x65\x6e\x73\x75\x72\x65\x56\x61\x6c\x69\x64\x56\x4e\x6f\x64\x65\x28\x63\x68\x69\x6c\x64\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x29\x20\x3f\x20\x76\x6e\x6f\x64\x65\x73\x20\x3a\x20\x6e\x75\x6c\x6c\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x6f\x48\x61\x6e\x64\x6c\x65\x72\x73\x28\x6f\x62\x6a\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x74\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x6f\x62\x6a\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x5b\x74\x6f\x48\x61\x6e\x64\x6c\x65\x72\x4b\x65\x79\x28\x6b\x65\x79\x29\x5d\x20\x3d\x20\x6f\x62\x6a\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x74\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x50\x75\x62\x6c\x69\x63\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x28\x69\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x53\x74\x61\x74\x65\x66\x75\x6c\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x69\x29\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x45\x78\x70\x6f\x73\x65\x50\x72\x6f\x78\x79\x28\x69\x29\x20\x7c\x7c\x20\x69\x2e\x70\x72\x6f\x78\x79\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x50\x75\x62\x6c\x69\x63\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x69\x2e\x70\x61\x72\x65\x6e\x74\x29\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x70\x75\x62\x6c\x69\x63\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x4d\x61\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x65\x78\x74\x65\x6e\x64\x28\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x6e\x75\x6c\x6c\x29\x2c\x20\x7b\x0a\x20\x20\x24\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x2c\x0a\x20\x20\x24\x65\x6c\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x2e\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x2c\x0a\x20\x20\x24\x64\x61\x74\x61\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x2e\x64\x61\x74\x61\x2c\x0a\x20\x20\x24\x70\x72\x6f\x70\x73\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x2e\x70\x72\x6f\x70\x73\x2c\x0a\x20\x20\x24\x61\x74\x74\x72\x73\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x2e\x61\x74\x74\x72\x73\x2c\x0a\x20\x20\x24\x73\x6c\x6f\x74\x73\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x2e\x73\x6c\x6f\x74\x73\x2c\x0a\x20\x20\x24\x72\x65\x66\x73\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x2e\x72\x65\x66\x73\x2c\x0a\x20\x20\x24\x70\x61\x72\x65\x6e\x74\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x67\x65\x74\x50\x75\x62\x6c\x69\x63\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x69\x2e\x70\x61\x72\x65\x6e\x74\x29\x2c\x0a\x20\x20\x24\x72\x6f\x6f\x74\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x67\x65\x74\x50\x75\x62\x6c\x69\x63\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x69\x2e\x72\x6f\x6f\x74\x29\x2c\x0a\x20\x20\x24\x65\x6d\x69\x74\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x2e\x65\x6d\x69\x74\x2c\x0a\x20\x20\x24\x6f\x70\x74\x69\x6f\x6e\x73\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x72\x65\x73\x6f\x6c\x76\x65\x4d\x65\x72\x67\x65\x64\x4f\x70\x74\x69\x6f\x6e\x73\x28\x69\x29\x2c\x0a\x20\x20\x24\x66\x6f\x72\x63\x65\x55\x70\x64\x61\x74\x65\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x2e\x66\x20\x7c\x7c\x20\x28\x69\x2e\x66\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x71\x75\x65\x75\x65\x4a\x6f\x62\x28\x69\x2e\x75\x70\x64\x61\x74\x65\x29\x29\x2c\x0a\x20\x20\x24\x6e\x65\x78\x74\x54\x69\x63\x6b\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x2e\x6e\x20\x7c\x7c\x20\x28\x69\x2e\x6e\x20\x3d\x20\x6e\x65\x78\x74\x54\x69\x63\x6b\x2e\x62\x69\x6e\x64\x28\x69\x2e\x70\x72\x6f\x78\x79\x29\x29\x2c\x0a\x20\x20\x24\x77\x61\x74\x63\x68\x3a\x20\x28\x69\x29\x20\x3d\x3e\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x57\x61\x74\x63\x68\x2e\x62\x69\x6e\x64\x28\x69\x29\x0a\x7d\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x50\x75\x62\x6c\x69\x63\x49\x6e\x73\x74\x61\x6e\x63\x65\x50\x72\x6f\x78\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x7b\x0a\x20\x20\x67\x65\x74\x28\x7b\x20\x5f\x3a\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x7d\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x63\x74\x78\x2c\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x64\x61\x74\x61\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x2c\x20\x74\x79\x70\x65\x2c\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x5b\x30\x5d\x20\x21\x3d\x3d\x20\x22\x24\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x20\x3d\x20\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x77\x69\x74\x63\x68\x20\x28\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x31\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x32\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x61\x74\x61\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x34\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x74\x78\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x33\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x20\x21\x3d\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x64\x61\x74\x61\x20\x21\x3d\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x64\x61\x74\x61\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x61\x74\x61\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x50\x72\x6f\x70\x73\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x5b\x30\x5d\x29\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x50\x72\x6f\x70\x73\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x33\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x63\x74\x78\x20\x21\x3d\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x63\x74\x78\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x34\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x74\x78\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x68\x6f\x75\x6c\x64\x43\x61\x63\x68\x65\x41\x63\x63\x65\x73\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x75\x62\x6c\x69\x63\x47\x65\x74\x74\x65\x72\x20\x3d\x20\x70\x75\x62\x6c\x69\x63\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x4d\x61\x70\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x73\x73\x4d\x6f\x64\x75\x6c\x65\x2c\x20\x67\x6c\x6f\x62\x61\x6c\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x75\x62\x6c\x69\x63\x47\x65\x74\x74\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x24\x61\x74\x74\x72\x73\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x22\x67\x65\x74\x22\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x75\x62\x6c\x69\x63\x47\x65\x74\x74\x65\x72\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x28\x63\x73\x73\x4d\x6f\x64\x75\x6c\x65\x20\x3d\x20\x74\x79\x70\x65\x2e\x5f\x5f\x63\x73\x73\x4d\x6f\x64\x75\x6c\x65\x73\x29\x20\x26\x26\x20\x28\x63\x73\x73\x4d\x6f\x64\x75\x6c\x65\x20\x3d\x20\x63\x73\x73\x4d\x6f\x64\x75\x6c\x65\x5b\x6b\x65\x79\x5d\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x73\x73\x4d\x6f\x64\x75\x6c\x65\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x63\x74\x78\x20\x21\x3d\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x63\x74\x78\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x34\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x74\x78\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x67\x6c\x6f\x62\x61\x6c\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x20\x3d\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x67\x6c\x6f\x62\x61\x6c\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x2c\x20\x68\x61\x73\x4f\x77\x6e\x28\x67\x6c\x6f\x62\x61\x6c\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x6c\x6f\x62\x61\x6c\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x73\x65\x74\x28\x7b\x20\x5f\x3a\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x7d\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x64\x61\x74\x61\x2c\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x63\x74\x78\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x20\x21\x3d\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x64\x61\x74\x61\x20\x21\x3d\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x64\x61\x74\x61\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x64\x61\x74\x61\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x68\x61\x73\x4f\x77\x6e\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x70\x73\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x5b\x30\x5d\x20\x3d\x3d\x3d\x20\x22\x24\x22\x20\x26\x26\x20\x6b\x65\x79\x2e\x73\x6c\x69\x63\x65\x28\x31\x29\x20\x69\x6e\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x74\x78\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x68\x61\x73\x28\x7b\x20\x5f\x3a\x20\x7b\x20\x64\x61\x74\x61\x2c\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x2c\x20\x63\x74\x78\x2c\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2c\x20\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x20\x7d\x20\x7d\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x21\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x5d\x20\x7c\x7c\x20\x64\x61\x74\x61\x20\x21\x3d\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x64\x61\x74\x61\x2c\x20\x6b\x65\x79\x29\x20\x7c\x7c\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x20\x21\x3d\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x6b\x65\x79\x29\x20\x7c\x7c\x20\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x50\x72\x6f\x70\x73\x20\x3d\x20\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x5b\x30\x5d\x29\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x50\x72\x6f\x70\x73\x2c\x20\x6b\x65\x79\x29\x20\x7c\x7c\x20\x68\x61\x73\x4f\x77\x6e\x28\x63\x74\x78\x2c\x20\x6b\x65\x79\x29\x20\x7c\x7c\x20\x68\x61\x73\x4f\x77\x6e\x28\x70\x75\x62\x6c\x69\x63\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x4d\x61\x70\x2c\x20\x6b\x65\x79\x29\x20\x7c\x7c\x20\x68\x61\x73\x4f\x77\x6e\x28\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x67\x6c\x6f\x62\x61\x6c\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x64\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x64\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x2e\x67\x65\x74\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x2e\x5f\x2e\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x68\x61\x73\x4f\x77\x6e\x28\x64\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x2c\x20\x22\x76\x61\x6c\x75\x65\x22\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x73\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x64\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x2e\x76\x61\x6c\x75\x65\x2c\x20\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x64\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x52\x75\x6e\x74\x69\x6d\x65\x43\x6f\x6d\x70\x69\x6c\x65\x64\x50\x75\x62\x6c\x69\x63\x49\x6e\x73\x74\x61\x6e\x63\x65\x50\x72\x6f\x78\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x65\x78\x74\x65\x6e\x64\x28\x7b\x7d\x2c\x20\x50\x75\x62\x6c\x69\x63\x49\x6e\x73\x74\x61\x6e\x63\x65\x50\x72\x6f\x78\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x20\x7b\x0a\x20\x20\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x2e\x75\x6e\x73\x63\x6f\x70\x61\x62\x6c\x65\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x50\x75\x62\x6c\x69\x63\x49\x6e\x73\x74\x61\x6e\x63\x65\x50\x72\x6f\x78\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x2e\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x68\x61\x73\x28\x5f\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x73\x32\x20\x3d\x20\x6b\x65\x79\x5b\x30\x5d\x20\x21\x3d\x3d\x20\x22\x5f\x22\x20\x26\x26\x20\x21\x69\x73\x47\x6c\x6f\x62\x61\x6c\x6c\x79\x57\x68\x69\x74\x65\x6c\x69\x73\x74\x65\x64\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x61\x73\x32\x3b\x0a\x20\x20\x7d\x0a\x7d\x29\x3b\x0a\x6c\x65\x74\x20\x73\x68\x6f\x75\x6c\x64\x43\x61\x63\x68\x65\x41\x63\x63\x65\x73\x73\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x61\x70\x70\x6c\x79\x4f\x70\x74\x69\x6f\x6e\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x70\x74\x69\x6f\x6e\x73\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x4d\x65\x72\x67\x65\x64\x4f\x70\x74\x69\x6f\x6e\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x78\x79\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x74\x78\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x63\x74\x78\x3b\x0a\x20\x20\x73\x68\x6f\x75\x6c\x64\x43\x61\x63\x68\x65\x41\x63\x63\x65\x73\x73\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2e\x62\x65\x66\x6f\x72\x65\x43\x72\x65\x61\x74\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x24\x31\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2e\x62\x65\x66\x6f\x72\x65\x43\x72\x65\x61\x74\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x22\x62\x63\x22\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x0a\x20\x20\x20\x20\x64\x61\x74\x61\x3a\x20\x64\x61\x74\x61\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x20\x20\x63\x6f\x6d\x70\x75\x74\x65\x64\x3a\x20\x63\x6f\x6d\x70\x75\x74\x65\x64\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x20\x20\x6d\x65\x74\x68\x6f\x64\x73\x2c\x0a\x20\x20\x20\x20\x77\x61\x74\x63\x68\x3a\x20\x77\x61\x74\x63\x68\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x76\x69\x64\x65\x3a\x20\x70\x72\x6f\x76\x69\x64\x65\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x20\x20\x69\x6e\x6a\x65\x63\x74\x3a\x20\x69\x6e\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x20\x20\x63\x72\x65\x61\x74\x65\x64\x2c\x0a\x20\x20\x20\x20\x62\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x2c\x0a\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x65\x64\x2c\x0a\x20\x20\x20\x20\x62\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x2c\x0a\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x64\x2c\x0a\x20\x20\x20\x20\x61\x63\x74\x69\x76\x61\x74\x65\x64\x2c\x0a\x20\x20\x20\x20\x64\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x2c\x0a\x20\x20\x20\x20\x62\x65\x66\x6f\x72\x65\x44\x65\x73\x74\x72\x6f\x79\x2c\x0a\x20\x20\x20\x20\x62\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x2c\x0a\x20\x20\x20\x20\x64\x65\x73\x74\x72\x6f\x79\x65\x64\x2c\x0a\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x2c\x0a\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x3a\x20\x72\x65\x6e\x64\x65\x72\x32\x2c\x0a\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x54\x72\x61\x63\x6b\x65\x64\x2c\x0a\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x54\x72\x69\x67\x67\x65\x72\x65\x64\x2c\x0a\x20\x20\x20\x20\x65\x72\x72\x6f\x72\x43\x61\x70\x74\x75\x72\x65\x64\x2c\x0a\x20\x20\x20\x20\x73\x65\x72\x76\x65\x72\x50\x72\x65\x66\x65\x74\x63\x68\x2c\x0a\x20\x20\x20\x20\x65\x78\x70\x6f\x73\x65\x2c\x0a\x20\x20\x20\x20\x69\x6e\x68\x65\x72\x69\x74\x41\x74\x74\x72\x73\x2c\x0a\x20\x20\x20\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x2c\x0a\x20\x20\x20\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x2c\x0a\x20\x20\x20\x20\x66\x69\x6c\x74\x65\x72\x73\x0a\x20\x20\x7d\x20\x3d\x20\x6f\x70\x74\x69\x6f\x6e\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x65\x63\x6b\x44\x75\x70\x6c\x69\x63\x61\x74\x65\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x6e\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x49\x6e\x6a\x65\x63\x74\x69\x6f\x6e\x73\x28\x69\x6e\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x63\x74\x78\x2c\x20\x63\x68\x65\x63\x6b\x44\x75\x70\x6c\x69\x63\x61\x74\x65\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x75\x6e\x77\x72\x61\x70\x49\x6e\x6a\x65\x63\x74\x65\x64\x52\x65\x66\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6d\x65\x74\x68\x6f\x64\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x6d\x65\x74\x68\x6f\x64\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x65\x74\x68\x6f\x64\x48\x61\x6e\x64\x6c\x65\x72\x20\x3d\x20\x6d\x65\x74\x68\x6f\x64\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x6d\x65\x74\x68\x6f\x64\x48\x61\x6e\x64\x6c\x65\x72\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x74\x78\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x6d\x65\x74\x68\x6f\x64\x48\x61\x6e\x64\x6c\x65\x72\x2e\x62\x69\x6e\x64\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x64\x61\x74\x61\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x61\x74\x61\x20\x3d\x20\x64\x61\x74\x61\x4f\x70\x74\x69\x6f\x6e\x73\x2e\x63\x61\x6c\x6c\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x2c\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x64\x61\x74\x61\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x64\x61\x74\x61\x20\x3d\x20\x72\x65\x61\x63\x74\x69\x76\x65\x28\x64\x61\x74\x61\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x73\x68\x6f\x75\x6c\x64\x43\x61\x63\x68\x65\x41\x63\x63\x65\x73\x73\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x63\x6f\x6d\x70\x75\x74\x65\x64\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x63\x6f\x6d\x70\x75\x74\x65\x64\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x70\x74\x20\x3d\x20\x63\x6f\x6d\x70\x75\x74\x65\x64\x4f\x70\x74\x69\x6f\x6e\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x32\x20\x3d\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x6f\x70\x74\x29\x20\x3f\x20\x6f\x70\x74\x2e\x62\x69\x6e\x64\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x2c\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x20\x3a\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x6f\x70\x74\x2e\x67\x65\x74\x29\x20\x3f\x20\x6f\x70\x74\x2e\x67\x65\x74\x2e\x62\x69\x6e\x64\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x2c\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x20\x3a\x20\x4e\x4f\x4f\x50\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x74\x32\x20\x3d\x20\x21\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x6f\x70\x74\x29\x20\x26\x26\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x6f\x70\x74\x2e\x73\x65\x74\x29\x20\x3f\x20\x6f\x70\x74\x2e\x73\x65\x74\x2e\x62\x69\x6e\x64\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x20\x3a\x20\x4e\x4f\x4f\x50\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x20\x3d\x20\x63\x6f\x6d\x70\x75\x74\x65\x64\x28\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x67\x65\x74\x3a\x20\x67\x65\x74\x32\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x3a\x20\x73\x65\x74\x32\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x63\x74\x78\x2c\x20\x6b\x65\x79\x2c\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x67\x65\x74\x3a\x20\x28\x29\x20\x3d\x3e\x20\x63\x2e\x76\x61\x6c\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x3a\x20\x28\x76\x29\x20\x3d\x3e\x20\x63\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x76\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x77\x61\x74\x63\x68\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x77\x61\x74\x63\x68\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x72\x65\x61\x74\x65\x57\x61\x74\x63\x68\x65\x72\x28\x77\x61\x74\x63\x68\x4f\x70\x74\x69\x6f\x6e\x73\x5b\x6b\x65\x79\x5d\x2c\x20\x63\x74\x78\x2c\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x2c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x70\x72\x6f\x76\x69\x64\x65\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x20\x3d\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x70\x72\x6f\x76\x69\x64\x65\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x3f\x20\x70\x72\x6f\x76\x69\x64\x65\x4f\x70\x74\x69\x6f\x6e\x73\x2e\x63\x61\x6c\x6c\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x20\x3a\x20\x70\x72\x6f\x76\x69\x64\x65\x4f\x70\x74\x69\x6f\x6e\x73\x3b\x0a\x20\x20\x20\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x6f\x77\x6e\x4b\x65\x79\x73\x28\x70\x72\x6f\x76\x69\x64\x65\x73\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x76\x69\x64\x65\x28\x6b\x65\x79\x2c\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x5b\x6b\x65\x79\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x63\x72\x65\x61\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x24\x31\x28\x63\x72\x65\x61\x74\x65\x64\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x22\x63\x22\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x72\x65\x67\x69\x73\x74\x65\x72\x2c\x20\x68\x6f\x6f\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x68\x6f\x6f\x6b\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x6f\x6b\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x5f\x68\x6f\x6f\x6b\x29\x20\x3d\x3e\x20\x72\x65\x67\x69\x73\x74\x65\x72\x28\x5f\x68\x6f\x6f\x6b\x2e\x62\x69\x6e\x64\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x68\x6f\x6f\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x28\x68\x6f\x6f\x6b\x2e\x62\x69\x6e\x64\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x42\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x2c\x20\x62\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x4d\x6f\x75\x6e\x74\x65\x64\x2c\x20\x6d\x6f\x75\x6e\x74\x65\x64\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x42\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x2c\x20\x62\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x55\x70\x64\x61\x74\x65\x64\x2c\x20\x75\x70\x64\x61\x74\x65\x64\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x41\x63\x74\x69\x76\x61\x74\x65\x64\x2c\x20\x61\x63\x74\x69\x76\x61\x74\x65\x64\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x44\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x2c\x20\x64\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x45\x72\x72\x6f\x72\x43\x61\x70\x74\x75\x72\x65\x64\x2c\x20\x65\x72\x72\x6f\x72\x43\x61\x70\x74\x75\x72\x65\x64\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x52\x65\x6e\x64\x65\x72\x54\x72\x61\x63\x6b\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x54\x72\x61\x63\x6b\x65\x64\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x52\x65\x6e\x64\x65\x72\x54\x72\x69\x67\x67\x65\x72\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x54\x72\x69\x67\x67\x65\x72\x65\x64\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x42\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x2c\x20\x62\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x2c\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x29\x3b\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x4c\x69\x66\x65\x63\x79\x63\x6c\x65\x48\x6f\x6f\x6b\x28\x6f\x6e\x53\x65\x72\x76\x65\x72\x50\x72\x65\x66\x65\x74\x63\x68\x2c\x20\x73\x65\x72\x76\x65\x72\x50\x72\x65\x66\x65\x74\x63\x68\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x65\x78\x70\x6f\x73\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x65\x78\x70\x6f\x73\x65\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x78\x70\x6f\x73\x65\x64\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x78\x70\x6f\x73\x65\x64\x20\x7c\x7c\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x78\x70\x6f\x73\x65\x64\x20\x3d\x20\x7b\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x78\x70\x6f\x73\x65\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x65\x78\x70\x6f\x73\x65\x64\x2c\x20\x6b\x65\x79\x2c\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x67\x65\x74\x3a\x20\x28\x29\x20\x3d\x3e\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x5b\x6b\x65\x79\x5d\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x3a\x20\x28\x76\x61\x6c\x29\x20\x3d\x3e\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x78\x70\x6f\x73\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x78\x70\x6f\x73\x65\x64\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x72\x65\x6e\x64\x65\x72\x32\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x72\x65\x6e\x64\x65\x72\x20\x3d\x3d\x3d\x20\x4e\x4f\x4f\x50\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x72\x65\x6e\x64\x65\x72\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x32\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x6e\x68\x65\x72\x69\x74\x41\x74\x74\x72\x73\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x69\x6e\x68\x65\x72\x69\x74\x41\x74\x74\x72\x73\x20\x3d\x20\x69\x6e\x68\x65\x72\x69\x74\x41\x74\x74\x72\x73\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x29\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x20\x3d\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x3b\x0a\x20\x20\x69\x66\x20\x28\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x29\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x20\x3d\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x49\x6e\x6a\x65\x63\x74\x69\x6f\x6e\x73\x28\x69\x6e\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x63\x74\x78\x2c\x20\x63\x68\x65\x63\x6b\x44\x75\x70\x6c\x69\x63\x61\x74\x65\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x20\x3d\x20\x4e\x4f\x4f\x50\x2c\x20\x75\x6e\x77\x72\x61\x70\x52\x65\x66\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x69\x6e\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x49\x6e\x6a\x65\x63\x74\x28\x69\x6e\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x69\x6e\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x70\x74\x20\x3d\x20\x69\x6e\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x69\x6e\x6a\x65\x63\x74\x65\x64\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x6f\x70\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x22\x64\x65\x66\x61\x75\x6c\x74\x22\x20\x69\x6e\x20\x6f\x70\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6a\x65\x63\x74\x65\x64\x20\x3d\x20\x69\x6e\x6a\x65\x63\x74\x28\x6f\x70\x74\x2e\x66\x72\x6f\x6d\x20\x7c\x7c\x20\x6b\x65\x79\x2c\x20\x6f\x70\x74\x2e\x64\x65\x66\x61\x75\x6c\x74\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6a\x65\x63\x74\x65\x64\x20\x3d\x20\x69\x6e\x6a\x65\x63\x74\x28\x6f\x70\x74\x2e\x66\x72\x6f\x6d\x20\x7c\x7c\x20\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x6a\x65\x63\x74\x65\x64\x20\x3d\x20\x69\x6e\x6a\x65\x63\x74\x28\x6f\x70\x74\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x66\x28\x69\x6e\x6a\x65\x63\x74\x65\x64\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x75\x6e\x77\x72\x61\x70\x52\x65\x66\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x63\x74\x78\x2c\x20\x6b\x65\x79\x2c\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x67\x65\x74\x3a\x20\x28\x29\x20\x3d\x3e\x20\x69\x6e\x6a\x65\x63\x74\x65\x64\x2e\x76\x61\x6c\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x3a\x20\x28\x76\x29\x20\x3d\x3e\x20\x69\x6e\x6a\x65\x63\x74\x65\x64\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x76\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x74\x78\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x69\x6e\x6a\x65\x63\x74\x65\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x74\x78\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x69\x6e\x6a\x65\x63\x74\x65\x64\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x24\x31\x28\x68\x6f\x6f\x6b\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x69\x73\x41\x72\x72\x61\x79\x28\x68\x6f\x6f\x6b\x29\x20\x3f\x20\x68\x6f\x6f\x6b\x2e\x6d\x61\x70\x28\x28\x68\x32\x29\x20\x3d\x3e\x20\x68\x32\x2e\x62\x69\x6e\x64\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x78\x79\x29\x29\x20\x3a\x20\x68\x6f\x6f\x6b\x2e\x62\x69\x6e\x64\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x78\x79\x29\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x79\x70\x65\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x57\x61\x74\x63\x68\x65\x72\x28\x72\x61\x77\x2c\x20\x63\x74\x78\x2c\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x74\x65\x72\x20\x3d\x20\x6b\x65\x79\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x22\x2e\x22\x29\x20\x3f\x20\x63\x72\x65\x61\x74\x65\x50\x61\x74\x68\x47\x65\x74\x74\x65\x72\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x2c\x20\x6b\x65\x79\x29\x20\x3a\x20\x28\x29\x20\x3d\x3e\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x72\x61\x77\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x6e\x64\x6c\x65\x72\x20\x3d\x20\x63\x74\x78\x5b\x72\x61\x77\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x68\x61\x6e\x64\x6c\x65\x72\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x77\x61\x74\x63\x68\x28\x67\x65\x74\x74\x65\x72\x2c\x20\x68\x61\x6e\x64\x6c\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x72\x61\x77\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x77\x61\x74\x63\x68\x28\x67\x65\x74\x74\x65\x72\x2c\x20\x72\x61\x77\x2e\x62\x69\x6e\x64\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x72\x61\x77\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x72\x61\x77\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x61\x77\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x72\x29\x20\x3d\x3e\x20\x63\x72\x65\x61\x74\x65\x57\x61\x74\x63\x68\x65\x72\x28\x72\x2c\x20\x63\x74\x78\x2c\x20\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x2c\x20\x6b\x65\x79\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x6e\x64\x6c\x65\x72\x20\x3d\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x72\x61\x77\x2e\x68\x61\x6e\x64\x6c\x65\x72\x29\x20\x3f\x20\x72\x61\x77\x2e\x68\x61\x6e\x64\x6c\x65\x72\x2e\x62\x69\x6e\x64\x28\x70\x75\x62\x6c\x69\x63\x54\x68\x69\x73\x29\x20\x3a\x20\x63\x74\x78\x5b\x72\x61\x77\x2e\x68\x61\x6e\x64\x6c\x65\x72\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x68\x61\x6e\x64\x6c\x65\x72\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x77\x61\x74\x63\x68\x28\x67\x65\x74\x74\x65\x72\x2c\x20\x68\x61\x6e\x64\x6c\x65\x72\x2c\x20\x72\x61\x77\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x4d\x65\x72\x67\x65\x64\x4f\x70\x74\x69\x6f\x6e\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x62\x61\x73\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x74\x79\x70\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6d\x69\x78\x69\x6e\x73\x2c\x20\x65\x78\x74\x65\x6e\x64\x73\x3a\x20\x65\x78\x74\x65\x6e\x64\x73\x4f\x70\x74\x69\x6f\x6e\x73\x20\x7d\x20\x3d\x20\x62\x61\x73\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6d\x69\x78\x69\x6e\x73\x3a\x20\x67\x6c\x6f\x62\x61\x6c\x4d\x69\x78\x69\x6e\x73\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x43\x61\x63\x68\x65\x3a\x20\x63\x61\x63\x68\x65\x2c\x20\x63\x6f\x6e\x66\x69\x67\x3a\x20\x7b\x20\x6f\x70\x74\x69\x6f\x6e\x4d\x65\x72\x67\x65\x53\x74\x72\x61\x74\x65\x67\x69\x65\x73\x20\x7d\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x64\x20\x3d\x20\x63\x61\x63\x68\x65\x2e\x67\x65\x74\x28\x62\x61\x73\x65\x29\x3b\x0a\x20\x20\x6c\x65\x74\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x3b\x0a\x20\x20\x69\x66\x20\x28\x63\x61\x63\x68\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x20\x3d\x20\x63\x61\x63\x68\x65\x64\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x67\x6c\x6f\x62\x61\x6c\x4d\x69\x78\x69\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x26\x26\x20\x21\x6d\x69\x78\x69\x6e\x73\x20\x26\x26\x20\x21\x65\x78\x74\x65\x6e\x64\x73\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x20\x3d\x20\x62\x61\x73\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x67\x6c\x6f\x62\x61\x6c\x4d\x69\x78\x69\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x67\x6c\x6f\x62\x61\x6c\x4d\x69\x78\x69\x6e\x73\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x6d\x29\x20\x3d\x3e\x20\x6d\x65\x72\x67\x65\x4f\x70\x74\x69\x6f\x6e\x73\x28\x72\x65\x73\x6f\x6c\x76\x65\x64\x2c\x20\x6d\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x4d\x65\x72\x67\x65\x53\x74\x72\x61\x74\x65\x67\x69\x65\x73\x2c\x20\x74\x72\x75\x65\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x6d\x65\x72\x67\x65\x4f\x70\x74\x69\x6f\x6e\x73\x28\x72\x65\x73\x6f\x6c\x76\x65\x64\x2c\x20\x62\x61\x73\x65\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x4d\x65\x72\x67\x65\x53\x74\x72\x61\x74\x65\x67\x69\x65\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x61\x63\x68\x65\x2e\x73\x65\x74\x28\x62\x61\x73\x65\x2c\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x65\x72\x67\x65\x4f\x70\x74\x69\x6f\x6e\x73\x28\x74\x6f\x2c\x20\x66\x72\x6f\x6d\x2c\x20\x73\x74\x72\x61\x74\x73\x2c\x20\x61\x73\x4d\x69\x78\x69\x6e\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6d\x69\x78\x69\x6e\x73\x2c\x20\x65\x78\x74\x65\x6e\x64\x73\x3a\x20\x65\x78\x74\x65\x6e\x64\x73\x4f\x70\x74\x69\x6f\x6e\x73\x20\x7d\x20\x3d\x20\x66\x72\x6f\x6d\x3b\x0a\x20\x20\x69\x66\x20\x28\x65\x78\x74\x65\x6e\x64\x73\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x6d\x65\x72\x67\x65\x4f\x70\x74\x69\x6f\x6e\x73\x28\x74\x6f\x2c\x20\x65\x78\x74\x65\x6e\x64\x73\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x73\x74\x72\x61\x74\x73\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6d\x69\x78\x69\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x6d\x69\x78\x69\x6e\x73\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x6d\x29\x20\x3d\x3e\x20\x6d\x65\x72\x67\x65\x4f\x70\x74\x69\x6f\x6e\x73\x28\x74\x6f\x2c\x20\x6d\x2c\x20\x73\x74\x72\x61\x74\x73\x2c\x20\x74\x72\x75\x65\x29\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x66\x72\x6f\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x61\x73\x4d\x69\x78\x69\x6e\x20\x26\x26\x20\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x65\x78\x70\x6f\x73\x65\x22\x29\x0a\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x74\x72\x61\x74\x20\x3d\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x4f\x70\x74\x69\x6f\x6e\x4d\x65\x72\x67\x65\x53\x74\x72\x61\x74\x73\x5b\x6b\x65\x79\x5d\x20\x7c\x7c\x20\x73\x74\x72\x61\x74\x73\x20\x26\x26\x20\x73\x74\x72\x61\x74\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x6f\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x73\x74\x72\x61\x74\x20\x3f\x20\x73\x74\x72\x61\x74\x28\x74\x6f\x5b\x6b\x65\x79\x5d\x2c\x20\x66\x72\x6f\x6d\x5b\x6b\x65\x79\x5d\x29\x20\x3a\x20\x66\x72\x6f\x6d\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x6f\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x4f\x70\x74\x69\x6f\x6e\x4d\x65\x72\x67\x65\x53\x74\x72\x61\x74\x73\x20\x3d\x20\x7b\x0a\x20\x20\x64\x61\x74\x61\x3a\x20\x6d\x65\x72\x67\x65\x44\x61\x74\x61\x46\x6e\x2c\x0a\x20\x20\x70\x72\x6f\x70\x73\x3a\x20\x6d\x65\x72\x67\x65\x4f\x62\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x65\x6d\x69\x74\x73\x3a\x20\x6d\x65\x72\x67\x65\x4f\x62\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x6d\x65\x74\x68\x6f\x64\x73\x3a\x20\x6d\x65\x72\x67\x65\x4f\x62\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x63\x6f\x6d\x70\x75\x74\x65\x64\x3a\x20\x6d\x65\x72\x67\x65\x4f\x62\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x43\x72\x65\x61\x74\x65\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x64\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x6d\x6f\x75\x6e\x74\x65\x64\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x75\x70\x64\x61\x74\x65\x64\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x44\x65\x73\x74\x72\x6f\x79\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x64\x65\x73\x74\x72\x6f\x79\x65\x64\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x61\x63\x74\x69\x76\x61\x74\x65\x64\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x64\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x65\x72\x72\x6f\x72\x43\x61\x70\x74\x75\x72\x65\x64\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x73\x65\x72\x76\x65\x72\x50\x72\x65\x66\x65\x74\x63\x68\x3a\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x2c\x0a\x20\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x3a\x20\x6d\x65\x72\x67\x65\x4f\x62\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x3a\x20\x6d\x65\x72\x67\x65\x4f\x62\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x77\x61\x74\x63\x68\x3a\x20\x6d\x65\x72\x67\x65\x57\x61\x74\x63\x68\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x0a\x20\x20\x70\x72\x6f\x76\x69\x64\x65\x3a\x20\x6d\x65\x72\x67\x65\x44\x61\x74\x61\x46\x6e\x2c\x0a\x20\x20\x69\x6e\x6a\x65\x63\x74\x3a\x20\x6d\x65\x72\x67\x65\x49\x6e\x6a\x65\x63\x74\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x65\x72\x67\x65\x44\x61\x74\x61\x46\x6e\x28\x74\x6f\x2c\x20\x66\x72\x6f\x6d\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x66\x72\x6f\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x6f\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x21\x74\x6f\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x72\x6f\x6d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x65\x72\x67\x65\x64\x44\x61\x74\x61\x46\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x78\x74\x65\x6e\x64\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x6f\x29\x20\x3f\x20\x74\x6f\x2e\x63\x61\x6c\x6c\x28\x74\x68\x69\x73\x2c\x20\x74\x68\x69\x73\x29\x20\x3a\x20\x74\x6f\x2c\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x66\x72\x6f\x6d\x29\x20\x3f\x20\x66\x72\x6f\x6d\x2e\x63\x61\x6c\x6c\x28\x74\x68\x69\x73\x2c\x20\x74\x68\x69\x73\x29\x20\x3a\x20\x66\x72\x6f\x6d\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x65\x72\x67\x65\x49\x6e\x6a\x65\x63\x74\x28\x74\x6f\x2c\x20\x66\x72\x6f\x6d\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6d\x65\x72\x67\x65\x4f\x62\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x49\x6e\x6a\x65\x63\x74\x28\x74\x6f\x29\x2c\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x49\x6e\x6a\x65\x63\x74\x28\x66\x72\x6f\x6d\x29\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x49\x6e\x6a\x65\x63\x74\x28\x72\x61\x77\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x72\x61\x77\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x72\x61\x77\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x5b\x72\x61\x77\x5b\x69\x5d\x5d\x20\x3d\x20\x72\x61\x77\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x28\x74\x6f\x2c\x20\x66\x72\x6f\x6d\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x6f\x20\x3f\x20\x5b\x2e\x2e\x2e\x6e\x65\x77\x20\x53\x65\x74\x28\x5b\x5d\x2e\x63\x6f\x6e\x63\x61\x74\x28\x74\x6f\x2c\x20\x66\x72\x6f\x6d\x29\x29\x5d\x20\x3a\x20\x66\x72\x6f\x6d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x65\x72\x67\x65\x4f\x62\x6a\x65\x63\x74\x4f\x70\x74\x69\x6f\x6e\x73\x28\x74\x6f\x2c\x20\x66\x72\x6f\x6d\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x6f\x20\x3f\x20\x65\x78\x74\x65\x6e\x64\x28\x65\x78\x74\x65\x6e\x64\x28\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x6e\x75\x6c\x6c\x29\x2c\x20\x74\x6f\x29\x2c\x20\x66\x72\x6f\x6d\x29\x20\x3a\x20\x66\x72\x6f\x6d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x65\x72\x67\x65\x57\x61\x74\x63\x68\x4f\x70\x74\x69\x6f\x6e\x73\x28\x74\x6f\x2c\x20\x66\x72\x6f\x6d\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x74\x6f\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x72\x6f\x6d\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x66\x72\x6f\x6d\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x6f\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x65\x72\x67\x65\x64\x20\x3d\x20\x65\x78\x74\x65\x6e\x64\x28\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x6e\x75\x6c\x6c\x29\x2c\x20\x74\x6f\x29\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x66\x72\x6f\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x6d\x65\x72\x67\x65\x64\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x6d\x65\x72\x67\x65\x41\x73\x41\x72\x72\x61\x79\x28\x74\x6f\x5b\x6b\x65\x79\x5d\x2c\x20\x66\x72\x6f\x6d\x5b\x6b\x65\x79\x5d\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6d\x65\x72\x67\x65\x64\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x69\x74\x50\x72\x6f\x70\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x2c\x20\x69\x73\x53\x74\x61\x74\x65\x66\x75\x6c\x2c\x20\x69\x73\x53\x53\x52\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x70\x73\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x74\x74\x72\x73\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x64\x65\x66\x28\x61\x74\x74\x72\x73\x2c\x20\x49\x6e\x74\x65\x72\x6e\x61\x6c\x4f\x62\x6a\x65\x63\x74\x4b\x65\x79\x2c\x20\x31\x29\x3b\x0a\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x70\x73\x44\x65\x66\x61\x75\x6c\x74\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x73\x65\x74\x46\x75\x6c\x6c\x50\x72\x6f\x70\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x61\x74\x74\x72\x73\x29\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x5b\x30\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x28\x6b\x65\x79\x20\x69\x6e\x20\x70\x72\x6f\x70\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x53\x74\x61\x74\x65\x66\x75\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x70\x73\x20\x3d\x20\x69\x73\x53\x53\x52\x20\x3f\x20\x70\x72\x6f\x70\x73\x20\x3a\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x63\x74\x69\x76\x65\x28\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x74\x79\x70\x65\x2e\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x70\x73\x20\x3d\x20\x61\x74\x74\x72\x73\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x70\x73\x20\x3d\x20\x70\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x74\x74\x72\x73\x20\x3d\x20\x61\x74\x74\x72\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x75\x70\x64\x61\x74\x65\x50\x72\x6f\x70\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x2c\x20\x72\x61\x77\x50\x72\x65\x76\x50\x72\x6f\x70\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x70\x72\x6f\x70\x73\x2c\x20\x61\x74\x74\x72\x73\x2c\x20\x76\x6e\x6f\x64\x65\x3a\x20\x7b\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x7d\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x43\x75\x72\x72\x65\x6e\x74\x50\x72\x6f\x70\x73\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x5b\x6f\x70\x74\x69\x6f\x6e\x73\x5d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x3b\x0a\x20\x20\x6c\x65\x74\x20\x68\x61\x73\x41\x74\x74\x72\x73\x43\x68\x61\x6e\x67\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x28\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x7c\x7c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3e\x20\x30\x29\x20\x26\x26\x20\x21\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x70\x73\x54\x6f\x55\x70\x64\x61\x74\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x2e\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x70\x72\x6f\x70\x73\x54\x6f\x55\x70\x64\x61\x74\x65\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x6b\x65\x79\x20\x3d\x20\x70\x72\x6f\x70\x73\x54\x6f\x55\x70\x64\x61\x74\x65\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x45\x6d\x69\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x6d\x69\x74\x73\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x69\x6e\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x68\x61\x73\x4f\x77\x6e\x28\x61\x74\x74\x72\x73\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x21\x3d\x3d\x20\x61\x74\x74\x72\x73\x5b\x6b\x65\x79\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x74\x74\x72\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x73\x41\x74\x74\x72\x73\x43\x68\x61\x6e\x67\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x64\x4b\x65\x79\x20\x3d\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x5b\x63\x61\x6d\x65\x6c\x69\x7a\x65\x64\x4b\x65\x79\x5d\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x50\x72\x6f\x70\x56\x61\x6c\x75\x65\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x72\x61\x77\x43\x75\x72\x72\x65\x6e\x74\x50\x72\x6f\x70\x73\x2c\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x64\x4b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x21\x3d\x3d\x20\x61\x74\x74\x72\x73\x5b\x6b\x65\x79\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x74\x74\x72\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x73\x41\x74\x74\x72\x73\x43\x68\x61\x6e\x67\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x65\x74\x46\x75\x6c\x6c\x50\x72\x6f\x70\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x61\x74\x74\x72\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x61\x73\x41\x74\x74\x72\x73\x43\x68\x61\x6e\x67\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6b\x65\x62\x61\x62\x4b\x65\x79\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x72\x61\x77\x43\x75\x72\x72\x65\x6e\x74\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x72\x61\x77\x50\x72\x6f\x70\x73\x20\x7c\x7c\x20\x21\x68\x61\x73\x4f\x77\x6e\x28\x72\x61\x77\x50\x72\x6f\x70\x73\x2c\x20\x6b\x65\x79\x29\x20\x26\x26\x20\x28\x28\x6b\x65\x62\x61\x62\x4b\x65\x79\x20\x3d\x20\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x28\x6b\x65\x79\x29\x29\x20\x3d\x3d\x3d\x20\x6b\x65\x79\x20\x7c\x7c\x20\x21\x68\x61\x73\x4f\x77\x6e\x28\x72\x61\x77\x50\x72\x6f\x70\x73\x2c\x20\x6b\x65\x62\x61\x62\x4b\x65\x79\x29\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x72\x61\x77\x50\x72\x65\x76\x50\x72\x6f\x70\x73\x20\x26\x26\x20\x28\x72\x61\x77\x50\x72\x65\x76\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x7c\x7c\x20\x72\x61\x77\x50\x72\x65\x76\x50\x72\x6f\x70\x73\x5b\x6b\x65\x62\x61\x62\x4b\x65\x79\x5d\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x50\x72\x6f\x70\x56\x61\x6c\x75\x65\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x72\x61\x77\x43\x75\x72\x72\x65\x6e\x74\x50\x72\x6f\x70\x73\x2c\x20\x6b\x65\x79\x2c\x20\x76\x6f\x69\x64\x20\x30\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x61\x74\x74\x72\x73\x20\x21\x3d\x3d\x20\x72\x61\x77\x43\x75\x72\x72\x65\x6e\x74\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x61\x74\x74\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x72\x61\x77\x50\x72\x6f\x70\x73\x20\x7c\x7c\x20\x21\x68\x61\x73\x4f\x77\x6e\x28\x72\x61\x77\x50\x72\x6f\x70\x73\x2c\x20\x6b\x65\x79\x29\x20\x26\x26\x20\x74\x72\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x20\x61\x74\x74\x72\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x73\x41\x74\x74\x72\x73\x43\x68\x61\x6e\x67\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x68\x61\x73\x41\x74\x74\x72\x73\x43\x68\x61\x6e\x67\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x72\x69\x67\x67\x65\x72\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x22\x73\x65\x74\x22\x2c\x20\x22\x24\x61\x74\x74\x72\x73\x22\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x46\x75\x6c\x6c\x50\x72\x6f\x70\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x61\x74\x74\x72\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x5b\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x6e\x65\x65\x64\x43\x61\x73\x74\x4b\x65\x79\x73\x5d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x3b\x0a\x20\x20\x6c\x65\x74\x20\x68\x61\x73\x41\x74\x74\x72\x73\x43\x68\x61\x6e\x67\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x72\x61\x77\x43\x61\x73\x74\x56\x61\x6c\x75\x65\x73\x3b\x0a\x20\x20\x69\x66\x20\x28\x72\x61\x77\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x73\x65\x72\x76\x65\x64\x50\x72\x6f\x70\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x69\x6e\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x61\x6d\x65\x6c\x4b\x65\x79\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x69\x6f\x6e\x73\x20\x26\x26\x20\x68\x61\x73\x4f\x77\x6e\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x63\x61\x6d\x65\x6c\x4b\x65\x79\x20\x3d\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x6b\x65\x79\x29\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x6e\x65\x65\x64\x43\x61\x73\x74\x4b\x65\x79\x73\x20\x7c\x7c\x20\x21\x6e\x65\x65\x64\x43\x61\x73\x74\x4b\x65\x79\x73\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x63\x61\x6d\x65\x6c\x4b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x5b\x63\x61\x6d\x65\x6c\x4b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x28\x72\x61\x77\x43\x61\x73\x74\x56\x61\x6c\x75\x65\x73\x20\x7c\x7c\x20\x28\x72\x61\x77\x43\x61\x73\x74\x56\x61\x6c\x75\x65\x73\x20\x3d\x20\x7b\x7d\x29\x29\x5b\x63\x61\x6d\x65\x6c\x4b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x69\x73\x45\x6d\x69\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x6d\x69\x74\x73\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x28\x6b\x65\x79\x20\x69\x6e\x20\x61\x74\x74\x72\x73\x29\x20\x7c\x7c\x20\x76\x61\x6c\x75\x65\x20\x21\x3d\x3d\x20\x61\x74\x74\x72\x73\x5b\x6b\x65\x79\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x74\x74\x72\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x73\x41\x74\x74\x72\x73\x43\x68\x61\x6e\x67\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6e\x65\x65\x64\x43\x61\x73\x74\x4b\x65\x79\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x43\x75\x72\x72\x65\x6e\x74\x50\x72\x6f\x70\x73\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x73\x74\x56\x61\x6c\x75\x65\x73\x20\x3d\x20\x72\x61\x77\x43\x61\x73\x74\x56\x61\x6c\x75\x65\x73\x20\x7c\x7c\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x6e\x65\x65\x64\x43\x61\x73\x74\x4b\x65\x79\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x3d\x20\x6e\x65\x65\x64\x43\x61\x73\x74\x4b\x65\x79\x73\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x50\x72\x6f\x70\x56\x61\x6c\x75\x65\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x72\x61\x77\x43\x75\x72\x72\x65\x6e\x74\x50\x72\x6f\x70\x73\x2c\x20\x6b\x65\x79\x2c\x20\x63\x61\x73\x74\x56\x61\x6c\x75\x65\x73\x5b\x6b\x65\x79\x5d\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x21\x68\x61\x73\x4f\x77\x6e\x28\x63\x61\x73\x74\x56\x61\x6c\x75\x65\x73\x2c\x20\x6b\x65\x79\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x61\x73\x41\x74\x74\x72\x73\x43\x68\x61\x6e\x67\x65\x64\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x50\x72\x6f\x70\x56\x61\x6c\x75\x65\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x69\x73\x41\x62\x73\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x70\x74\x20\x3d\x20\x6f\x70\x74\x69\x6f\x6e\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x73\x44\x65\x66\x61\x75\x6c\x74\x20\x3d\x20\x68\x61\x73\x4f\x77\x6e\x28\x6f\x70\x74\x2c\x20\x22\x64\x65\x66\x61\x75\x6c\x74\x22\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x68\x61\x73\x44\x65\x66\x61\x75\x6c\x74\x20\x26\x26\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x20\x3d\x20\x6f\x70\x74\x2e\x64\x65\x66\x61\x75\x6c\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x46\x75\x6e\x63\x74\x69\x6f\x6e\x20\x26\x26\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x70\x72\x6f\x70\x73\x44\x65\x66\x61\x75\x6c\x74\x73\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x69\x6e\x20\x70\x72\x6f\x70\x73\x44\x65\x66\x61\x75\x6c\x74\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x70\x72\x6f\x70\x73\x44\x65\x66\x61\x75\x6c\x74\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x70\x72\x6f\x70\x73\x44\x65\x66\x61\x75\x6c\x74\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x2e\x63\x61\x6c\x6c\x28\x6e\x75\x6c\x6c\x2c\x20\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x64\x65\x66\x61\x75\x6c\x74\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x5b\x30\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x62\x73\x65\x6e\x74\x20\x26\x26\x20\x21\x68\x61\x73\x44\x65\x66\x61\x75\x6c\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6f\x70\x74\x5b\x31\x5d\x20\x26\x26\x20\x28\x76\x61\x6c\x75\x65\x20\x3d\x3d\x3d\x20\x22\x22\x20\x7c\x7c\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x3d\x20\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x28\x6b\x65\x79\x29\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x50\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x28\x63\x6f\x6d\x70\x2c\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2c\x20\x61\x73\x4d\x69\x78\x69\x6e\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x20\x3d\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x70\x72\x6f\x70\x73\x43\x61\x63\x68\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x64\x20\x3d\x20\x63\x61\x63\x68\x65\x2e\x67\x65\x74\x28\x63\x6f\x6d\x70\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x63\x61\x63\x68\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x61\x63\x68\x65\x64\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x20\x3d\x20\x63\x6f\x6d\x70\x2e\x70\x72\x6f\x70\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x65\x64\x43\x61\x73\x74\x4b\x65\x79\x73\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x6c\x65\x74\x20\x68\x61\x73\x45\x78\x74\x65\x6e\x64\x73\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x63\x6f\x6d\x70\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x78\x74\x65\x6e\x64\x50\x72\x6f\x70\x73\x20\x3d\x20\x28\x72\x61\x77\x32\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x61\x73\x45\x78\x74\x65\x6e\x64\x73\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x5b\x70\x72\x6f\x70\x73\x2c\x20\x6b\x65\x79\x73\x5d\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x50\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x28\x72\x61\x77\x32\x2c\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x78\x74\x65\x6e\x64\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x2c\x20\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x73\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x65\x64\x43\x61\x73\x74\x4b\x65\x79\x73\x2e\x70\x75\x73\x68\x28\x2e\x2e\x2e\x6b\x65\x79\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x61\x73\x4d\x69\x78\x69\x6e\x20\x26\x26\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x6d\x69\x78\x69\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x6d\x69\x78\x69\x6e\x73\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x65\x78\x74\x65\x6e\x64\x50\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6f\x6d\x70\x2e\x65\x78\x74\x65\x6e\x64\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x78\x74\x65\x6e\x64\x50\x72\x6f\x70\x73\x28\x63\x6f\x6d\x70\x2e\x65\x78\x74\x65\x6e\x64\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6f\x6d\x70\x2e\x6d\x69\x78\x69\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6d\x70\x2e\x6d\x69\x78\x69\x6e\x73\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x65\x78\x74\x65\x6e\x64\x50\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x21\x72\x61\x77\x20\x26\x26\x20\x21\x68\x61\x73\x45\x78\x74\x65\x6e\x64\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x63\x68\x65\x2e\x73\x65\x74\x28\x63\x6f\x6d\x70\x2c\x20\x45\x4d\x50\x54\x59\x5f\x41\x52\x52\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x45\x4d\x50\x54\x59\x5f\x41\x52\x52\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x72\x61\x77\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x72\x61\x77\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x4b\x65\x79\x20\x3d\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x72\x61\x77\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x69\x64\x61\x74\x65\x50\x72\x6f\x70\x4e\x61\x6d\x65\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x4b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x5b\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x4b\x65\x79\x5d\x20\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x72\x61\x77\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x72\x61\x77\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x4b\x65\x79\x20\x3d\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x69\x64\x61\x74\x65\x50\x72\x6f\x70\x4e\x61\x6d\x65\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x4b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x70\x74\x20\x3d\x20\x72\x61\x77\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x70\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x5b\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x4b\x65\x79\x5d\x20\x3d\x20\x69\x73\x41\x72\x72\x61\x79\x28\x6f\x70\x74\x29\x20\x7c\x7c\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x6f\x70\x74\x29\x20\x3f\x20\x7b\x20\x74\x79\x70\x65\x3a\x20\x6f\x70\x74\x20\x7d\x20\x3a\x20\x6f\x70\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x6f\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x62\x6f\x6f\x6c\x65\x61\x6e\x49\x6e\x64\x65\x78\x20\x3d\x20\x67\x65\x74\x54\x79\x70\x65\x49\x6e\x64\x65\x78\x28\x42\x6f\x6f\x6c\x65\x61\x6e\x2c\x20\x70\x72\x6f\x70\x2e\x74\x79\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x74\x72\x69\x6e\x67\x49\x6e\x64\x65\x78\x20\x3d\x20\x67\x65\x74\x54\x79\x70\x65\x49\x6e\x64\x65\x78\x28\x53\x74\x72\x69\x6e\x67\x2c\x20\x70\x72\x6f\x70\x2e\x74\x79\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x5b\x30\x5d\x20\x3d\x20\x62\x6f\x6f\x6c\x65\x61\x6e\x49\x6e\x64\x65\x78\x20\x3e\x20\x2d\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x5b\x31\x5d\x20\x3d\x20\x73\x74\x72\x69\x6e\x67\x49\x6e\x64\x65\x78\x20\x3c\x20\x30\x20\x7c\x7c\x20\x62\x6f\x6f\x6c\x65\x61\x6e\x49\x6e\x64\x65\x78\x20\x3c\x20\x73\x74\x72\x69\x6e\x67\x49\x6e\x64\x65\x78\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x62\x6f\x6f\x6c\x65\x61\x6e\x49\x6e\x64\x65\x78\x20\x3e\x20\x2d\x31\x20\x7c\x7c\x20\x68\x61\x73\x4f\x77\x6e\x28\x70\x72\x6f\x70\x2c\x20\x22\x64\x65\x66\x61\x75\x6c\x74\x22\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x65\x64\x43\x61\x73\x74\x4b\x65\x79\x73\x2e\x70\x75\x73\x68\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x4b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x5b\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x2c\x20\x6e\x65\x65\x64\x43\x61\x73\x74\x4b\x65\x79\x73\x5d\x3b\x0a\x20\x20\x63\x61\x63\x68\x65\x2e\x73\x65\x74\x28\x63\x6f\x6d\x70\x2c\x20\x72\x65\x73\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x76\x61\x6c\x69\x64\x61\x74\x65\x50\x72\x6f\x70\x4e\x61\x6d\x65\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x5b\x30\x5d\x20\x21\x3d\x3d\x20\x22\x24\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x54\x79\x70\x65\x28\x63\x74\x6f\x72\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x61\x74\x63\x68\x20\x3d\x20\x63\x74\x6f\x72\x20\x26\x26\x20\x63\x74\x6f\x72\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x28\x29\x2e\x6d\x61\x74\x63\x68\x28\x2f\x5e\x5c\x73\x2a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x28\x5c\x77\x2b\x29\x2f\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6d\x61\x74\x63\x68\x20\x3f\x20\x6d\x61\x74\x63\x68\x5b\x31\x5d\x20\x3a\x20\x63\x74\x6f\x72\x20\x3d\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x22\x6e\x75\x6c\x6c\x22\x20\x3a\x20\x22\x22\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x53\x61\x6d\x65\x54\x79\x70\x65\x28\x61\x2c\x20\x62\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x54\x79\x70\x65\x28\x61\x29\x20\x3d\x3d\x3d\x20\x67\x65\x74\x54\x79\x70\x65\x28\x62\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x54\x79\x70\x65\x49\x6e\x64\x65\x78\x28\x74\x79\x70\x65\x2c\x20\x65\x78\x70\x65\x63\x74\x65\x64\x54\x79\x70\x65\x73\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x65\x78\x70\x65\x63\x74\x65\x64\x54\x79\x70\x65\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x78\x70\x65\x63\x74\x65\x64\x54\x79\x70\x65\x73\x2e\x66\x69\x6e\x64\x49\x6e\x64\x65\x78\x28\x28\x74\x29\x20\x3d\x3e\x20\x69\x73\x53\x61\x6d\x65\x54\x79\x70\x65\x28\x74\x2c\x20\x74\x79\x70\x65\x29\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x65\x78\x70\x65\x63\x74\x65\x64\x54\x79\x70\x65\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x53\x61\x6d\x65\x54\x79\x70\x65\x28\x65\x78\x70\x65\x63\x74\x65\x64\x54\x79\x70\x65\x73\x2c\x20\x74\x79\x70\x65\x29\x20\x3f\x20\x30\x20\x3a\x20\x2d\x31\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x2d\x31\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x49\x6e\x74\x65\x72\x6e\x61\x6c\x4b\x65\x79\x20\x3d\x20\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x6b\x65\x79\x5b\x30\x5d\x20\x3d\x3d\x3d\x20\x22\x5f\x22\x20\x7c\x7c\x20\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x24\x73\x74\x61\x62\x6c\x65\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x6c\x6f\x74\x56\x61\x6c\x75\x65\x20\x3d\x20\x28\x76\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x75\x65\x29\x20\x3f\x20\x76\x61\x6c\x75\x65\x2e\x6d\x61\x70\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x29\x20\x3a\x20\x5b\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x76\x61\x6c\x75\x65\x29\x5d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x6c\x6f\x74\x20\x3d\x20\x28\x6b\x65\x79\x2c\x20\x72\x61\x77\x53\x6c\x6f\x74\x2c\x20\x63\x74\x78\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x72\x61\x77\x53\x6c\x6f\x74\x2e\x5f\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x53\x6c\x6f\x74\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x20\x3d\x20\x77\x69\x74\x68\x43\x74\x78\x28\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x6c\x6f\x74\x56\x61\x6c\x75\x65\x28\x72\x61\x77\x53\x6c\x6f\x74\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x29\x3b\x0a\x20\x20\x7d\x2c\x20\x63\x74\x78\x29\x3b\x0a\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x2e\x5f\x63\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x4f\x62\x6a\x65\x63\x74\x53\x6c\x6f\x74\x73\x20\x3d\x20\x28\x72\x61\x77\x53\x6c\x6f\x74\x73\x2c\x20\x73\x6c\x6f\x74\x73\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x74\x78\x20\x3d\x20\x72\x61\x77\x53\x6c\x6f\x74\x73\x2e\x5f\x63\x74\x78\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x72\x61\x77\x53\x6c\x6f\x74\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x49\x6e\x74\x65\x72\x6e\x61\x6c\x4b\x65\x79\x28\x6b\x65\x79\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x69\x6e\x75\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x72\x61\x77\x53\x6c\x6f\x74\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x6c\x6f\x74\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x6c\x6f\x74\x28\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x63\x74\x78\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x6c\x6f\x74\x56\x61\x6c\x75\x65\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x6c\x6f\x74\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x53\x6c\x6f\x74\x73\x20\x3d\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x6c\x6f\x74\x56\x61\x6c\x75\x65\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x6c\x6f\x74\x73\x2e\x64\x65\x66\x61\x75\x6c\x74\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x6e\x69\x74\x53\x6c\x6f\x74\x73\x20\x3d\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x33\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x79\x70\x65\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x5f\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x6c\x6f\x74\x73\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x64\x65\x66\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x22\x5f\x22\x2c\x20\x74\x79\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x4f\x62\x6a\x65\x63\x74\x53\x6c\x6f\x74\x73\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x6c\x6f\x74\x73\x20\x3d\x20\x7b\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x6c\x6f\x74\x73\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x53\x6c\x6f\x74\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x64\x65\x66\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x6c\x6f\x74\x73\x2c\x20\x49\x6e\x74\x65\x72\x6e\x61\x6c\x4f\x62\x6a\x65\x63\x74\x4b\x65\x79\x2c\x20\x31\x29\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x75\x70\x64\x61\x74\x65\x53\x6c\x6f\x74\x73\x20\x3d\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x76\x6e\x6f\x64\x65\x2c\x20\x73\x6c\x6f\x74\x73\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x6e\x65\x65\x64\x44\x65\x6c\x65\x74\x69\x6f\x6e\x43\x68\x65\x63\x6b\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x6c\x65\x74\x20\x64\x65\x6c\x65\x74\x69\x6f\x6e\x43\x6f\x6d\x70\x61\x72\x69\x73\x6f\x6e\x54\x61\x72\x67\x65\x74\x20\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x3b\x0a\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x33\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x79\x70\x65\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x5f\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x26\x26\x20\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x65\x64\x44\x65\x6c\x65\x74\x69\x6f\x6e\x43\x68\x65\x63\x6b\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x78\x74\x65\x6e\x64\x28\x73\x6c\x6f\x74\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x26\x26\x20\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x20\x73\x6c\x6f\x74\x73\x2e\x5f\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x65\x64\x44\x65\x6c\x65\x74\x69\x6f\x6e\x43\x68\x65\x63\x6b\x20\x3d\x20\x21\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x24\x73\x74\x61\x62\x6c\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x4f\x62\x6a\x65\x63\x74\x53\x6c\x6f\x74\x73\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x73\x6c\x6f\x74\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x69\x6f\x6e\x43\x6f\x6d\x70\x61\x72\x69\x73\x6f\x6e\x54\x61\x72\x67\x65\x74\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x53\x6c\x6f\x74\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x69\x6f\x6e\x43\x6f\x6d\x70\x61\x72\x69\x73\x6f\x6e\x54\x61\x72\x67\x65\x74\x20\x3d\x20\x7b\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x20\x31\x20\x7d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6e\x65\x65\x64\x44\x65\x6c\x65\x74\x69\x6f\x6e\x43\x68\x65\x63\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x73\x6c\x6f\x74\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x49\x6e\x74\x65\x72\x6e\x61\x6c\x4b\x65\x79\x28\x6b\x65\x79\x29\x20\x26\x26\x20\x21\x28\x6b\x65\x79\x20\x69\x6e\x20\x64\x65\x6c\x65\x74\x69\x6f\x6e\x43\x6f\x6d\x70\x61\x72\x69\x73\x6f\x6e\x54\x61\x72\x67\x65\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x20\x73\x6c\x6f\x74\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x41\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x28\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x0a\x20\x20\x20\x20\x61\x70\x70\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x63\x6f\x6e\x66\x69\x67\x3a\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x73\x4e\x61\x74\x69\x76\x65\x54\x61\x67\x3a\x20\x4e\x4f\x2c\x0a\x20\x20\x20\x20\x20\x20\x70\x65\x72\x66\x6f\x72\x6d\x61\x6e\x63\x65\x3a\x20\x66\x61\x6c\x73\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x67\x6c\x6f\x62\x61\x6c\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x3a\x20\x7b\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x6f\x70\x74\x69\x6f\x6e\x4d\x65\x72\x67\x65\x53\x74\x72\x61\x74\x65\x67\x69\x65\x73\x3a\x20\x7b\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x65\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x65\x72\x3a\x20\x76\x6f\x69\x64\x20\x30\x2c\x0a\x20\x20\x20\x20\x20\x20\x77\x61\x72\x6e\x48\x61\x6e\x64\x6c\x65\x72\x3a\x20\x76\x6f\x69\x64\x20\x30\x2c\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6d\x70\x69\x6c\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x3a\x20\x7b\x7d\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x6d\x69\x78\x69\x6e\x73\x3a\x20\x5b\x5d\x2c\x0a\x20\x20\x20\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x3a\x20\x7b\x7d\x2c\x0a\x20\x20\x20\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x3a\x20\x7b\x7d\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x3a\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x6e\x75\x6c\x6c\x29\x2c\x0a\x20\x20\x20\x20\x6f\x70\x74\x69\x6f\x6e\x73\x43\x61\x63\x68\x65\x3a\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x57\x65\x61\x6b\x4d\x61\x70\x28\x29\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x43\x61\x63\x68\x65\x3a\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x57\x65\x61\x6b\x4d\x61\x70\x28\x29\x2c\x0a\x20\x20\x20\x20\x65\x6d\x69\x74\x73\x43\x61\x63\x68\x65\x3a\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x57\x65\x61\x6b\x4d\x61\x70\x28\x29\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x6c\x65\x74\x20\x75\x69\x64\x20\x3d\x20\x30\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x41\x70\x70\x41\x50\x49\x28\x72\x65\x6e\x64\x65\x72\x32\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x32\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x41\x70\x70\x32\x28\x72\x6f\x6f\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x72\x6f\x6f\x74\x50\x72\x6f\x70\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x72\x6f\x6f\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x6f\x6f\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x61\x73\x73\x69\x67\x6e\x28\x7b\x7d\x2c\x20\x72\x6f\x6f\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x72\x6f\x6f\x74\x50\x72\x6f\x70\x73\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x20\x26\x26\x20\x21\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x72\x6f\x6f\x74\x50\x72\x6f\x70\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x6f\x6f\x74\x50\x72\x6f\x70\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6e\x74\x65\x78\x74\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x41\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x28\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6c\x6c\x65\x64\x50\x6c\x75\x67\x69\x6e\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x53\x65\x74\x28\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x70\x70\x32\x20\x3d\x20\x63\x6f\x6e\x74\x65\x78\x74\x2e\x61\x70\x70\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x5f\x75\x69\x64\x3a\x20\x75\x69\x64\x2b\x2b\x2c\x0a\x20\x20\x20\x20\x20\x20\x5f\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3a\x20\x72\x6f\x6f\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x20\x20\x20\x20\x5f\x70\x72\x6f\x70\x73\x3a\x20\x72\x6f\x6f\x74\x50\x72\x6f\x70\x73\x2c\x0a\x20\x20\x20\x20\x20\x20\x5f\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x20\x20\x5f\x63\x6f\x6e\x74\x65\x78\x74\x3a\x20\x63\x6f\x6e\x74\x65\x78\x74\x2c\x0a\x20\x20\x20\x20\x20\x20\x5f\x69\x6e\x73\x74\x61\x6e\x63\x65\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x20\x20\x76\x65\x72\x73\x69\x6f\x6e\x2c\x0a\x20\x20\x20\x20\x20\x20\x67\x65\x74\x20\x63\x6f\x6e\x66\x69\x67\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6f\x6e\x74\x65\x78\x74\x2e\x63\x6f\x6e\x66\x69\x67\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x20\x63\x6f\x6e\x66\x69\x67\x28\x76\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x75\x73\x65\x28\x70\x6c\x75\x67\x69\x6e\x2c\x20\x2e\x2e\x2e\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6c\x6c\x65\x64\x50\x6c\x75\x67\x69\x6e\x73\x2e\x68\x61\x73\x28\x70\x6c\x75\x67\x69\x6e\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x70\x6c\x75\x67\x69\x6e\x20\x26\x26\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x70\x6c\x75\x67\x69\x6e\x2e\x69\x6e\x73\x74\x61\x6c\x6c\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6c\x6c\x65\x64\x50\x6c\x75\x67\x69\x6e\x73\x2e\x61\x64\x64\x28\x70\x6c\x75\x67\x69\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x6c\x75\x67\x69\x6e\x2e\x69\x6e\x73\x74\x61\x6c\x6c\x28\x61\x70\x70\x32\x2c\x20\x2e\x2e\x2e\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x70\x6c\x75\x67\x69\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6c\x6c\x65\x64\x50\x6c\x75\x67\x69\x6e\x73\x2e\x61\x64\x64\x28\x70\x6c\x75\x67\x69\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x6c\x75\x67\x69\x6e\x28\x61\x70\x70\x32\x2c\x20\x2e\x2e\x2e\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x70\x70\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x6d\x69\x78\x69\x6e\x28\x6d\x69\x78\x69\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x63\x6f\x6e\x74\x65\x78\x74\x2e\x6d\x69\x78\x69\x6e\x73\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x6d\x69\x78\x69\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x65\x78\x74\x2e\x6d\x69\x78\x69\x6e\x73\x2e\x70\x75\x73\x68\x28\x6d\x69\x78\x69\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x70\x70\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x6e\x61\x6d\x65\x2c\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6f\x6e\x74\x65\x78\x74\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x5b\x6e\x61\x6d\x65\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x65\x78\x74\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x5b\x6e\x61\x6d\x65\x5d\x20\x3d\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x70\x70\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x28\x6e\x61\x6d\x65\x2c\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x64\x69\x72\x65\x63\x74\x69\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6f\x6e\x74\x65\x78\x74\x2e\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x5b\x6e\x61\x6d\x65\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x65\x78\x74\x2e\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x5b\x6e\x61\x6d\x65\x5d\x20\x3d\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x70\x70\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x28\x72\x6f\x6f\x74\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x69\x73\x48\x79\x64\x72\x61\x74\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x72\x6f\x6f\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x72\x6f\x6f\x74\x50\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x20\x3d\x20\x63\x6f\x6e\x74\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x48\x79\x64\x72\x61\x74\x65\x20\x26\x26\x20\x68\x79\x64\x72\x61\x74\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x79\x64\x72\x61\x74\x65\x32\x28\x76\x6e\x6f\x64\x65\x2c\x20\x72\x6f\x6f\x74\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x32\x28\x76\x6e\x6f\x64\x65\x2c\x20\x72\x6f\x6f\x74\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x70\x70\x32\x2e\x5f\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x72\x6f\x6f\x74\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x6f\x6f\x74\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x5f\x5f\x76\x75\x65\x5f\x61\x70\x70\x5f\x5f\x20\x3d\x20\x61\x70\x70\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x45\x78\x70\x6f\x73\x65\x50\x72\x6f\x78\x79\x28\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7c\x7c\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x70\x72\x6f\x78\x79\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x32\x28\x6e\x75\x6c\x6c\x2c\x20\x61\x70\x70\x32\x2e\x5f\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x65\x74\x65\x20\x61\x70\x70\x32\x2e\x5f\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x5f\x5f\x76\x75\x65\x5f\x61\x70\x70\x5f\x5f\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x76\x69\x64\x65\x28\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x65\x78\x74\x2e\x70\x72\x6f\x76\x69\x64\x65\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x70\x70\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x70\x70\x32\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x52\x65\x66\x28\x72\x61\x77\x52\x65\x66\x2c\x20\x6f\x6c\x64\x52\x61\x77\x52\x65\x66\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x72\x61\x77\x52\x65\x66\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x61\x77\x52\x65\x66\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x72\x2c\x20\x69\x29\x20\x3d\x3e\x20\x73\x65\x74\x52\x65\x66\x28\x72\x2c\x20\x6f\x6c\x64\x52\x61\x77\x52\x65\x66\x20\x26\x26\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x6f\x6c\x64\x52\x61\x77\x52\x65\x66\x29\x20\x3f\x20\x6f\x6c\x64\x52\x61\x77\x52\x65\x66\x5b\x69\x5d\x20\x3a\x20\x6f\x6c\x64\x52\x61\x77\x52\x65\x66\x29\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x29\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x20\x26\x26\x20\x21\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x66\x56\x61\x6c\x75\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x34\x20\x3f\x20\x67\x65\x74\x45\x78\x70\x6f\x73\x65\x50\x72\x6f\x78\x79\x28\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7c\x7c\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x70\x72\x6f\x78\x79\x20\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x20\x3f\x20\x6e\x75\x6c\x6c\x20\x3a\x20\x72\x65\x66\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x69\x3a\x20\x6f\x77\x6e\x65\x72\x2c\x20\x72\x3a\x20\x72\x65\x66\x32\x20\x7d\x20\x3d\x20\x72\x61\x77\x52\x65\x66\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6c\x64\x52\x65\x66\x20\x3d\x20\x6f\x6c\x64\x52\x61\x77\x52\x65\x66\x20\x26\x26\x20\x6f\x6c\x64\x52\x61\x77\x52\x65\x66\x2e\x72\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x66\x73\x20\x3d\x20\x6f\x77\x6e\x65\x72\x2e\x72\x65\x66\x73\x20\x3d\x3d\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x20\x3f\x20\x6f\x77\x6e\x65\x72\x2e\x72\x65\x66\x73\x20\x3d\x20\x7b\x7d\x20\x3a\x20\x6f\x77\x6e\x65\x72\x2e\x72\x65\x66\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x20\x3d\x20\x6f\x77\x6e\x65\x72\x2e\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x6f\x6c\x64\x52\x65\x66\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x20\x26\x26\x20\x6f\x6c\x64\x52\x65\x66\x20\x21\x3d\x3d\x20\x72\x65\x66\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x6f\x6c\x64\x52\x65\x66\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x66\x73\x5b\x6f\x6c\x64\x52\x65\x66\x5d\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x68\x61\x73\x4f\x77\x6e\x28\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x6f\x6c\x64\x52\x65\x66\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x5b\x6f\x6c\x64\x52\x65\x66\x5d\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x52\x65\x66\x28\x6f\x6c\x64\x52\x65\x66\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6f\x6c\x64\x52\x65\x66\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x72\x65\x66\x32\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x72\x65\x66\x32\x2c\x20\x6f\x77\x6e\x65\x72\x2c\x20\x31\x32\x2c\x20\x5b\x76\x61\x6c\x75\x65\x2c\x20\x72\x65\x66\x73\x5d\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x5f\x69\x73\x53\x74\x72\x69\x6e\x67\x20\x3d\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x72\x65\x66\x32\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x5f\x69\x73\x52\x65\x66\x20\x3d\x20\x69\x73\x52\x65\x66\x28\x72\x65\x66\x32\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x5f\x69\x73\x53\x74\x72\x69\x6e\x67\x20\x7c\x7c\x20\x5f\x69\x73\x52\x65\x66\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x6f\x53\x65\x74\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x72\x61\x77\x52\x65\x66\x2e\x66\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x20\x3d\x20\x5f\x69\x73\x53\x74\x72\x69\x6e\x67\x20\x3f\x20\x72\x65\x66\x73\x5b\x72\x65\x66\x32\x5d\x20\x3a\x20\x72\x65\x66\x32\x2e\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x73\x41\x72\x72\x61\x79\x28\x65\x78\x69\x73\x74\x69\x6e\x67\x29\x20\x26\x26\x20\x72\x65\x6d\x6f\x76\x65\x28\x65\x78\x69\x73\x74\x69\x6e\x67\x2c\x20\x72\x65\x66\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x41\x72\x72\x61\x79\x28\x65\x78\x69\x73\x74\x69\x6e\x67\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x5f\x69\x73\x53\x74\x72\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x66\x73\x5b\x72\x65\x66\x32\x5d\x20\x3d\x20\x5b\x72\x65\x66\x56\x61\x6c\x75\x65\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x68\x61\x73\x4f\x77\x6e\x28\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x72\x65\x66\x32\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x5b\x72\x65\x66\x32\x5d\x20\x3d\x20\x72\x65\x66\x73\x5b\x72\x65\x66\x32\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x66\x32\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x5b\x72\x65\x66\x56\x61\x6c\x75\x65\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x72\x61\x77\x52\x65\x66\x2e\x6b\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x66\x73\x5b\x72\x61\x77\x52\x65\x66\x2e\x6b\x5d\x20\x3d\x20\x72\x65\x66\x32\x2e\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x65\x78\x69\x73\x74\x69\x6e\x67\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x72\x65\x66\x56\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x2e\x70\x75\x73\x68\x28\x72\x65\x66\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x5f\x69\x73\x53\x74\x72\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x66\x73\x5b\x72\x65\x66\x32\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x68\x61\x73\x4f\x77\x6e\x28\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x2c\x20\x72\x65\x66\x32\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x5b\x72\x65\x66\x32\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x5f\x69\x73\x52\x65\x66\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x66\x32\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x72\x61\x77\x52\x65\x66\x2e\x6b\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x66\x73\x5b\x72\x61\x77\x52\x65\x66\x2e\x6b\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6f\x53\x65\x74\x2e\x69\x64\x20\x3d\x20\x2d\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x64\x6f\x53\x65\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6f\x53\x65\x74\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x6c\x65\x74\x20\x68\x61\x73\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x53\x56\x47\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x20\x3d\x3e\x20\x2f\x73\x76\x67\x2f\x2e\x74\x65\x73\x74\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x6e\x61\x6d\x65\x73\x70\x61\x63\x65\x55\x52\x49\x29\x20\x26\x26\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x74\x61\x67\x4e\x61\x6d\x65\x20\x21\x3d\x3d\x20\x22\x66\x6f\x72\x65\x69\x67\x6e\x4f\x62\x6a\x65\x63\x74\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x43\x6f\x6d\x6d\x65\x6e\x74\x20\x3d\x20\x28\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x6e\x6f\x64\x65\x2e\x6e\x6f\x64\x65\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x38\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x46\x75\x6e\x63\x74\x69\x6f\x6e\x73\x28\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6d\x74\x3a\x20\x6d\x6f\x75\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x3a\x20\x70\x61\x74\x63\x68\x2c\x20\x6f\x3a\x20\x7b\x20\x70\x61\x74\x63\x68\x50\x72\x6f\x70\x3a\x20\x70\x61\x74\x63\x68\x50\x72\x6f\x70\x32\x2c\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x2c\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x2c\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x2c\x20\x72\x65\x6d\x6f\x76\x65\x3a\x20\x72\x65\x6d\x6f\x76\x65\x32\x2c\x20\x69\x6e\x73\x65\x72\x74\x2c\x20\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x6d\x65\x6e\x74\x20\x7d\x20\x7d\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x79\x64\x72\x61\x74\x65\x32\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x68\x61\x73\x43\x68\x69\x6c\x64\x4e\x6f\x64\x65\x73\x28\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6c\x75\x73\x68\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x5f\x76\x6e\x6f\x64\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x68\x61\x73\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x66\x69\x72\x73\x74\x43\x68\x69\x6c\x64\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x20\x20\x66\x6c\x75\x73\x68\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x28\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x5f\x76\x6e\x6f\x64\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x68\x61\x73\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x26\x26\x20\x74\x72\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x6f\x6c\x65\x2e\x65\x72\x72\x6f\x72\x28\x60\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x20\x63\x6f\x6d\x70\x6c\x65\x74\x65\x64\x20\x62\x75\x74\x20\x63\x6f\x6e\x74\x61\x69\x6e\x73\x20\x6d\x69\x73\x6d\x61\x74\x63\x68\x65\x73\x2e\x60\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x20\x3d\x20\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x46\x72\x61\x67\x6d\x65\x6e\x74\x53\x74\x61\x72\x74\x20\x3d\x20\x69\x73\x43\x6f\x6d\x6d\x65\x6e\x74\x28\x6e\x6f\x64\x65\x29\x20\x26\x26\x20\x6e\x6f\x64\x65\x2e\x64\x61\x74\x61\x20\x3d\x3d\x3d\x20\x22\x5b\x22\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x68\x61\x6e\x64\x6c\x65\x4d\x69\x73\x6d\x61\x74\x63\x68\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x69\x73\x46\x72\x61\x67\x6d\x65\x6e\x74\x53\x74\x61\x72\x74\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x74\x79\x70\x65\x2c\x20\x72\x65\x66\x3a\x20\x72\x65\x66\x32\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x6f\x6d\x54\x79\x70\x65\x20\x3d\x20\x6e\x6f\x64\x65\x2e\x6e\x6f\x64\x65\x54\x79\x70\x65\x3b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x20\x3d\x20\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3d\x3d\x3d\x20\x2d\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x73\x77\x69\x74\x63\x68\x20\x28\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x54\x65\x78\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x6f\x6d\x54\x79\x70\x65\x20\x21\x3d\x3d\x20\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x3d\x3d\x20\x22\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x65\x72\x74\x28\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x28\x22\x22\x29\x2c\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x28\x6e\x6f\x64\x65\x29\x2c\x20\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6f\x6e\x4d\x69\x73\x6d\x61\x74\x63\x68\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x6f\x64\x65\x2e\x64\x61\x74\x61\x20\x21\x3d\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x73\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x6f\x64\x65\x2e\x64\x61\x74\x61\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x6f\x6d\x54\x79\x70\x65\x20\x21\x3d\x3d\x20\x38\x20\x7c\x7c\x20\x69\x73\x46\x72\x61\x67\x6d\x65\x6e\x74\x53\x74\x61\x72\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6f\x6e\x4d\x69\x73\x6d\x61\x74\x63\x68\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x53\x74\x61\x74\x69\x63\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x6f\x6d\x54\x79\x70\x65\x20\x21\x3d\x3d\x20\x31\x20\x26\x26\x20\x64\x6f\x6d\x54\x79\x70\x65\x20\x21\x3d\x3d\x20\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6f\x6e\x4d\x69\x73\x6d\x61\x74\x63\x68\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x65\x64\x54\x6f\x41\x64\x6f\x70\x74\x43\x6f\x6e\x74\x65\x6e\x74\x20\x3d\x20\x21\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x76\x6e\x6f\x64\x65\x2e\x73\x74\x61\x74\x69\x63\x43\x6f\x75\x6e\x74\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x65\x64\x54\x6f\x41\x64\x6f\x70\x74\x43\x6f\x6e\x74\x65\x6e\x74\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x2b\x3d\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x2e\x6e\x6f\x64\x65\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x31\x20\x3f\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x2e\x6f\x75\x74\x65\x72\x48\x54\x4d\x4c\x20\x3a\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x2e\x64\x61\x74\x61\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x20\x3d\x3d\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x73\x74\x61\x74\x69\x63\x43\x6f\x75\x6e\x74\x20\x2d\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x65\x78\x74\x4e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x46\x72\x61\x67\x6d\x65\x6e\x74\x53\x74\x61\x72\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6f\x6e\x4d\x69\x73\x6d\x61\x74\x63\x68\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x68\x79\x64\x72\x61\x74\x65\x46\x72\x61\x67\x6d\x65\x6e\x74\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x6f\x6d\x54\x79\x70\x65\x20\x21\x3d\x3d\x20\x31\x20\x7c\x7c\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2e\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65\x28\x29\x20\x21\x3d\x3d\x20\x6e\x6f\x64\x65\x2e\x74\x61\x67\x4e\x61\x6d\x65\x2e\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65\x28\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6f\x6e\x4d\x69\x73\x6d\x61\x74\x63\x68\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x68\x79\x64\x72\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x20\x3d\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x69\x73\x46\x72\x61\x67\x6d\x65\x6e\x74\x53\x74\x61\x72\x74\x20\x3f\x20\x6c\x6f\x63\x61\x74\x65\x43\x6c\x6f\x73\x69\x6e\x67\x41\x73\x79\x6e\x63\x41\x6e\x63\x68\x6f\x72\x28\x6e\x6f\x64\x65\x29\x20\x3a\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x26\x26\x20\x69\x73\x43\x6f\x6d\x6d\x65\x6e\x74\x28\x6e\x65\x78\x74\x4e\x6f\x64\x65\x29\x20\x26\x26\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x2e\x64\x61\x74\x61\x20\x3d\x3d\x3d\x20\x22\x74\x65\x6c\x65\x70\x6f\x72\x74\x20\x65\x6e\x64\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x65\x78\x74\x4e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x73\x75\x62\x54\x72\x65\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x46\x72\x61\x67\x6d\x65\x6e\x74\x53\x74\x61\x72\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x46\x72\x61\x67\x6d\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x62\x54\x72\x65\x65\x2e\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3f\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x2e\x70\x72\x65\x76\x69\x6f\x75\x73\x53\x69\x62\x6c\x69\x6e\x67\x20\x3a\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x6c\x61\x73\x74\x43\x68\x69\x6c\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x20\x6e\x6f\x64\x65\x2e\x6e\x6f\x64\x65\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x33\x20\x3f\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x56\x4e\x6f\x64\x65\x28\x22\x22\x29\x20\x3a\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x22\x64\x69\x76\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x75\x62\x54\x72\x65\x65\x2e\x65\x6c\x20\x3d\x20\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x20\x73\x75\x62\x54\x72\x65\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x6f\x6d\x54\x79\x70\x65\x20\x21\x3d\x3d\x20\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x6f\x6e\x4d\x69\x73\x6d\x61\x74\x63\x68\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2e\x68\x79\x64\x72\x61\x74\x65\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2e\x68\x79\x64\x72\x61\x74\x65\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x28\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x28\x6e\x6f\x64\x65\x29\x29\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x49\x6e\x74\x65\x72\x6e\x61\x6c\x73\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x72\x65\x66\x32\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x52\x65\x66\x28\x72\x65\x66\x32\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x78\x74\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x79\x64\x72\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x20\x3d\x20\x28\x65\x6c\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3d\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x7c\x7c\x20\x21\x21\x76\x6e\x6f\x64\x65\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x20\x64\x69\x72\x73\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x6f\x72\x63\x65\x50\x61\x74\x63\x68\x56\x61\x6c\x75\x65\x20\x3d\x20\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x69\x6e\x70\x75\x74\x22\x20\x26\x26\x20\x64\x69\x72\x73\x20\x7c\x7c\x20\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x6f\x70\x74\x69\x6f\x6e\x22\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x66\x6f\x72\x63\x65\x50\x61\x74\x63\x68\x56\x61\x6c\x75\x65\x20\x7c\x7c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x21\x3d\x3d\x20\x2d\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x22\x63\x72\x65\x61\x74\x65\x64\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x66\x6f\x72\x63\x65\x50\x61\x74\x63\x68\x56\x61\x6c\x75\x65\x20\x7c\x7c\x20\x21\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x7c\x7c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x28\x31\x36\x20\x7c\x20\x33\x32\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x66\x6f\x72\x63\x65\x50\x61\x74\x63\x68\x56\x61\x6c\x75\x65\x20\x26\x26\x20\x6b\x65\x79\x2e\x65\x6e\x64\x73\x57\x69\x74\x68\x28\x22\x76\x61\x6c\x75\x65\x22\x29\x20\x7c\x7c\x20\x69\x73\x4f\x6e\x28\x6b\x65\x79\x29\x20\x26\x26\x20\x21\x69\x73\x52\x65\x73\x65\x72\x76\x65\x64\x50\x72\x6f\x70\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x50\x72\x6f\x70\x32\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x2c\x20\x66\x61\x6c\x73\x65\x2c\x20\x76\x6f\x69\x64\x20\x30\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x43\x6c\x69\x63\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x50\x72\x6f\x70\x32\x28\x65\x6c\x2c\x20\x22\x6f\x6e\x43\x6c\x69\x63\x6b\x22\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x43\x6c\x69\x63\x6b\x2c\x20\x66\x61\x6c\x73\x65\x2c\x20\x76\x6f\x69\x64\x20\x30\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x73\x20\x3d\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x42\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x73\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x22\x62\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x73\x20\x3d\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x4d\x6f\x75\x6e\x74\x65\x64\x29\x20\x7c\x7c\x20\x64\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x45\x66\x66\x65\x63\x74\x57\x69\x74\x68\x53\x75\x73\x70\x65\x6e\x73\x65\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x73\x20\x26\x26\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x73\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x69\x72\x73\x20\x26\x26\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x22\x6d\x6f\x75\x6e\x74\x65\x64\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x20\x26\x26\x20\x21\x28\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x28\x70\x72\x6f\x70\x73\x2e\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c\x20\x7c\x7c\x20\x70\x72\x6f\x70\x73\x2e\x74\x65\x78\x74\x43\x6f\x6e\x74\x65\x6e\x74\x29\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x6e\x65\x78\x74\x20\x3d\x20\x68\x79\x64\x72\x61\x74\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x65\x6c\x2e\x66\x69\x72\x73\x74\x43\x68\x69\x6c\x64\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x65\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x6e\x65\x78\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x73\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x75\x72\x20\x3d\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x20\x3d\x20\x6e\x65\x78\x74\x2e\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x32\x28\x63\x75\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x74\x65\x78\x74\x43\x6f\x6e\x74\x65\x6e\x74\x20\x21\x3d\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x73\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x74\x65\x78\x74\x43\x6f\x6e\x74\x65\x6e\x74\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x6c\x2e\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x79\x64\x72\x61\x74\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x28\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3d\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x7c\x7c\x20\x21\x21\x70\x61\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x6c\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3f\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x20\x3a\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x6f\x64\x65\x20\x3d\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x54\x65\x78\x74\x20\x26\x26\x20\x21\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x69\x6e\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x73\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x79\x64\x72\x61\x74\x65\x46\x72\x61\x67\x6d\x65\x6e\x74\x20\x3d\x20\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x3a\x20\x66\x72\x61\x67\x6d\x65\x6e\x74\x53\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x66\x72\x61\x67\x6d\x65\x6e\x74\x53\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x20\x3d\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x20\x3f\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2e\x63\x6f\x6e\x63\x61\x74\x28\x66\x72\x61\x67\x6d\x65\x6e\x74\x53\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x20\x3a\x20\x66\x72\x61\x67\x6d\x65\x6e\x74\x53\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x20\x3d\x20\x68\x79\x64\x72\x61\x74\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x6f\x64\x65\x29\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x20\x26\x26\x20\x69\x73\x43\x6f\x6d\x6d\x65\x6e\x74\x28\x6e\x65\x78\x74\x29\x20\x26\x26\x20\x6e\x65\x78\x74\x2e\x64\x61\x74\x61\x20\x3d\x3d\x3d\x20\x22\x5d\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x76\x6e\x6f\x64\x65\x2e\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x65\x78\x74\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x61\x73\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x65\x72\x74\x28\x76\x6e\x6f\x64\x65\x2e\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x6d\x65\x6e\x74\x28\x60\x5d\x60\x29\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x65\x78\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x6e\x64\x6c\x65\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x3d\x20\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x69\x73\x46\x72\x61\x67\x6d\x65\x6e\x74\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x68\x61\x73\x4d\x69\x73\x6d\x61\x74\x63\x68\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x46\x72\x61\x67\x6d\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6e\x64\x20\x3d\x20\x6c\x6f\x63\x61\x74\x65\x43\x6c\x6f\x73\x69\x6e\x67\x41\x73\x79\x6e\x63\x41\x6e\x63\x68\x6f\x72\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x74\x72\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x32\x20\x3d\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x32\x20\x26\x26\x20\x6e\x65\x78\x74\x32\x20\x21\x3d\x3d\x20\x65\x6e\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x32\x28\x6e\x65\x78\x74\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x20\x3d\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x32\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x65\x78\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x6f\x63\x61\x74\x65\x43\x6c\x6f\x73\x69\x6e\x67\x41\x73\x79\x6e\x63\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x28\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6d\x61\x74\x63\x68\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x6f\x64\x65\x20\x3d\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x6f\x64\x65\x20\x26\x26\x20\x69\x73\x43\x6f\x6d\x6d\x65\x6e\x74\x28\x6e\x6f\x64\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x6f\x64\x65\x2e\x64\x61\x74\x61\x20\x3d\x3d\x3d\x20\x22\x5b\x22\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x61\x74\x63\x68\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x6f\x64\x65\x2e\x64\x61\x74\x61\x20\x3d\x3d\x3d\x20\x22\x5d\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6d\x61\x74\x63\x68\x20\x3d\x3d\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x61\x74\x63\x68\x2d\x2d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5b\x68\x79\x64\x72\x61\x74\x65\x32\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x5d\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x20\x3d\x20\x71\x75\x65\x75\x65\x45\x66\x66\x65\x63\x74\x57\x69\x74\x68\x53\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x62\x61\x73\x65\x43\x72\x65\x61\x74\x65\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x62\x61\x73\x65\x43\x72\x65\x61\x74\x65\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x63\x72\x65\x61\x74\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x46\x75\x6e\x63\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x62\x61\x73\x65\x43\x72\x65\x61\x74\x65\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x63\x72\x65\x61\x74\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x46\x6e\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x67\x65\x74\x47\x6c\x6f\x62\x61\x6c\x54\x68\x69\x73\x28\x29\x3b\x0a\x20\x20\x74\x61\x72\x67\x65\x74\x2e\x5f\x5f\x56\x55\x45\x5f\x5f\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x69\x6e\x73\x65\x72\x74\x3a\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x2c\x20\x72\x65\x6d\x6f\x76\x65\x3a\x20\x68\x6f\x73\x74\x52\x65\x6d\x6f\x76\x65\x2c\x20\x70\x61\x74\x63\x68\x50\x72\x6f\x70\x3a\x20\x68\x6f\x73\x74\x50\x61\x74\x63\x68\x50\x72\x6f\x70\x2c\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x3a\x20\x68\x6f\x73\x74\x43\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x2c\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x3a\x20\x68\x6f\x73\x74\x43\x72\x65\x61\x74\x65\x54\x65\x78\x74\x2c\x20\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x6d\x65\x6e\x74\x3a\x20\x68\x6f\x73\x74\x43\x72\x65\x61\x74\x65\x43\x6f\x6d\x6d\x65\x6e\x74\x2c\x20\x73\x65\x74\x54\x65\x78\x74\x3a\x20\x68\x6f\x73\x74\x53\x65\x74\x54\x65\x78\x74\x2c\x20\x73\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x54\x65\x78\x74\x3a\x20\x68\x6f\x73\x74\x53\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x54\x65\x78\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x3a\x20\x68\x6f\x73\x74\x50\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x2c\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x3a\x20\x68\x6f\x73\x74\x4e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x2c\x20\x73\x65\x74\x53\x63\x6f\x70\x65\x49\x64\x3a\x20\x68\x6f\x73\x74\x53\x65\x74\x53\x63\x6f\x70\x65\x49\x64\x20\x3d\x20\x4e\x4f\x4f\x50\x2c\x20\x63\x6c\x6f\x6e\x65\x4e\x6f\x64\x65\x3a\x20\x68\x6f\x73\x74\x43\x6c\x6f\x6e\x65\x4e\x6f\x64\x65\x2c\x20\x69\x6e\x73\x65\x72\x74\x53\x74\x61\x74\x69\x63\x43\x6f\x6e\x74\x65\x6e\x74\x3a\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x53\x74\x61\x74\x69\x63\x43\x6f\x6e\x74\x65\x6e\x74\x20\x7d\x20\x3d\x20\x6f\x70\x74\x69\x6f\x6e\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x74\x63\x68\x20\x3d\x20\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x69\x73\x53\x56\x47\x20\x3d\x20\x66\x61\x6c\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3d\x20\x21\x21\x6e\x32\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x20\x3d\x3d\x3d\x20\x6e\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x20\x26\x26\x20\x21\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x6e\x31\x2c\x20\x6e\x32\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x67\x65\x74\x4e\x65\x78\x74\x48\x6f\x73\x74\x4e\x6f\x64\x65\x28\x6e\x31\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x6e\x31\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6e\x31\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x32\x2e\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3d\x3d\x3d\x20\x2d\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x6e\x32\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x74\x79\x70\x65\x2c\x20\x72\x65\x66\x3a\x20\x72\x65\x66\x32\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x7d\x20\x3d\x20\x6e\x32\x3b\x0a\x20\x20\x20\x20\x73\x77\x69\x74\x63\x68\x20\x28\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x54\x65\x78\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x63\x65\x73\x73\x54\x65\x78\x74\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x63\x65\x73\x73\x43\x6f\x6d\x6d\x65\x6e\x74\x4e\x6f\x64\x65\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x53\x74\x61\x74\x69\x63\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x53\x74\x61\x74\x69\x63\x4e\x6f\x64\x65\x28\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x63\x65\x73\x73\x46\x72\x61\x67\x6d\x65\x6e\x74\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x63\x65\x73\x73\x45\x6c\x65\x6d\x65\x6e\x74\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x63\x65\x73\x73\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x2e\x70\x72\x6f\x63\x65\x73\x73\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x2e\x70\x72\x6f\x63\x65\x73\x73\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x72\x65\x66\x32\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x20\x26\x26\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x52\x65\x66\x28\x72\x65\x66\x32\x2c\x20\x6e\x31\x20\x26\x26\x20\x6e\x31\x2e\x72\x65\x66\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x6e\x32\x20\x7c\x7c\x20\x6e\x31\x2c\x20\x21\x6e\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x63\x65\x73\x73\x54\x65\x78\x74\x20\x3d\x20\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x6e\x32\x2e\x65\x6c\x20\x3d\x20\x68\x6f\x73\x74\x43\x72\x65\x61\x74\x65\x54\x65\x78\x74\x28\x6e\x32\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6c\x20\x3d\x20\x6e\x32\x2e\x65\x6c\x20\x3d\x20\x6e\x31\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x32\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x21\x3d\x3d\x20\x6e\x31\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x53\x65\x74\x54\x65\x78\x74\x28\x65\x6c\x2c\x20\x6e\x32\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x63\x65\x73\x73\x43\x6f\x6d\x6d\x65\x6e\x74\x4e\x6f\x64\x65\x20\x3d\x20\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x6e\x32\x2e\x65\x6c\x20\x3d\x20\x68\x6f\x73\x74\x43\x72\x65\x61\x74\x65\x43\x6f\x6d\x6d\x65\x6e\x74\x28\x6e\x32\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x7c\x7c\x20\x22\x22\x29\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x32\x2e\x65\x6c\x20\x3d\x20\x6e\x31\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x75\x6e\x74\x53\x74\x61\x74\x69\x63\x4e\x6f\x64\x65\x20\x3d\x20\x28\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x73\x53\x56\x47\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x5b\x6e\x32\x2e\x65\x6c\x2c\x20\x6e\x32\x2e\x61\x6e\x63\x68\x6f\x72\x5d\x20\x3d\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x53\x74\x61\x74\x69\x63\x43\x6f\x6e\x74\x65\x6e\x74\x28\x6e\x32\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x6e\x32\x2e\x65\x6c\x2c\x20\x6e\x32\x2e\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x76\x65\x53\x74\x61\x74\x69\x63\x4e\x6f\x64\x65\x20\x3d\x20\x28\x7b\x20\x65\x6c\x2c\x20\x61\x6e\x63\x68\x6f\x72\x20\x7d\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x65\x6c\x20\x26\x26\x20\x65\x6c\x20\x21\x3d\x3d\x20\x61\x6e\x63\x68\x6f\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x20\x3d\x20\x68\x6f\x73\x74\x4e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x65\x6c\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x20\x3d\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x61\x6e\x63\x68\x6f\x72\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x6d\x6f\x76\x65\x53\x74\x61\x74\x69\x63\x4e\x6f\x64\x65\x20\x3d\x20\x28\x7b\x20\x65\x6c\x2c\x20\x61\x6e\x63\x68\x6f\x72\x20\x7d\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x65\x6c\x20\x26\x26\x20\x65\x6c\x20\x21\x3d\x3d\x20\x61\x6e\x63\x68\x6f\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x20\x3d\x20\x68\x6f\x73\x74\x4e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x52\x65\x6d\x6f\x76\x65\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x20\x3d\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x68\x6f\x73\x74\x52\x65\x6d\x6f\x76\x65\x28\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x63\x65\x73\x73\x45\x6c\x65\x6d\x65\x6e\x74\x20\x3d\x20\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x73\x53\x56\x47\x20\x3d\x20\x69\x73\x53\x56\x47\x20\x7c\x7c\x20\x6e\x32\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x73\x76\x67\x22\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x45\x6c\x65\x6d\x65\x6e\x74\x28\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x45\x6c\x65\x6d\x65\x6e\x74\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x75\x6e\x74\x45\x6c\x65\x6d\x65\x6e\x74\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x65\x6c\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x64\x69\x72\x73\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x20\x26\x26\x20\x68\x6f\x73\x74\x43\x6c\x6f\x6e\x65\x4e\x6f\x64\x65\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x26\x26\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3d\x3d\x3d\x20\x2d\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x20\x3d\x20\x68\x6f\x73\x74\x43\x6c\x6f\x6e\x65\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x20\x3d\x20\x68\x6f\x73\x74\x43\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x28\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x2e\x69\x73\x2c\x20\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x53\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x54\x65\x78\x74\x28\x65\x6c\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x65\x6c\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x20\x26\x26\x20\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x22\x66\x6f\x72\x65\x69\x67\x6e\x4f\x62\x6a\x65\x63\x74\x22\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x22\x63\x72\x65\x61\x74\x65\x64\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x21\x3d\x3d\x20\x22\x76\x61\x6c\x75\x65\x22\x20\x26\x26\x20\x21\x69\x73\x52\x65\x73\x65\x72\x76\x65\x64\x50\x72\x6f\x70\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x50\x61\x74\x63\x68\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x22\x76\x61\x6c\x75\x65\x22\x20\x69\x6e\x20\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x50\x61\x74\x63\x68\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x22\x76\x61\x6c\x75\x65\x22\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x72\x6f\x70\x73\x2e\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x42\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x53\x63\x6f\x70\x65\x49\x64\x28\x65\x6c\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x73\x63\x6f\x70\x65\x49\x64\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x64\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x22\x62\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x22\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x65\x64\x43\x61\x6c\x6c\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x20\x3d\x20\x28\x21\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x7c\x7c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x26\x26\x20\x21\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x29\x20\x26\x26\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x26\x26\x20\x21\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x70\x65\x72\x73\x69\x73\x74\x65\x64\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x65\x64\x43\x61\x6c\x6c\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x62\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x65\x6c\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x4d\x6f\x75\x6e\x74\x65\x64\x29\x20\x7c\x7c\x20\x6e\x65\x65\x64\x43\x61\x6c\x6c\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x20\x7c\x7c\x20\x64\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x26\x26\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x65\x64\x43\x61\x6c\x6c\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x20\x26\x26\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x65\x6e\x74\x65\x72\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x69\x72\x73\x20\x26\x26\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x22\x6d\x6f\x75\x6e\x74\x65\x64\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x74\x53\x63\x6f\x70\x65\x49\x64\x20\x3d\x20\x28\x65\x6c\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x73\x63\x6f\x70\x65\x49\x64\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x63\x6f\x70\x65\x49\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x53\x65\x74\x53\x63\x6f\x70\x65\x49\x64\x28\x65\x6c\x2c\x20\x73\x63\x6f\x70\x65\x49\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x53\x65\x74\x53\x63\x6f\x70\x65\x49\x64\x28\x65\x6c\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x73\x75\x62\x54\x72\x65\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x20\x3d\x3d\x3d\x20\x73\x75\x62\x54\x72\x65\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x53\x63\x6f\x70\x65\x49\x64\x28\x65\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x2e\x73\x63\x6f\x70\x65\x49\x64\x2c\x20\x70\x61\x72\x65\x6e\x74\x56\x4e\x6f\x64\x65\x2e\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x70\x61\x72\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x73\x74\x61\x72\x74\x20\x3d\x20\x30\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x73\x74\x61\x72\x74\x3b\x20\x69\x20\x3c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x69\x6c\x64\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x20\x3d\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3f\x20\x63\x6c\x6f\x6e\x65\x49\x66\x4d\x6f\x75\x6e\x74\x65\x64\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x29\x20\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x63\x68\x69\x6c\x64\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x74\x63\x68\x45\x6c\x65\x6d\x65\x6e\x74\x20\x3d\x20\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6c\x20\x3d\x20\x6e\x32\x2e\x65\x6c\x20\x3d\x20\x6e\x31\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x7b\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x64\x69\x72\x73\x20\x7d\x20\x3d\x20\x6e\x32\x3b\x0a\x20\x20\x20\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x7c\x3d\x20\x6e\x31\x2e\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6c\x64\x50\x72\x6f\x70\x73\x20\x3d\x20\x6e\x31\x2e\x70\x72\x6f\x70\x73\x20\x7c\x7c\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x20\x3d\x20\x6e\x32\x2e\x70\x72\x6f\x70\x73\x20\x7c\x7c\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x3b\x0a\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x26\x26\x20\x74\x6f\x67\x67\x6c\x65\x52\x65\x63\x75\x72\x73\x65\x28\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x42\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x6e\x32\x2c\x20\x6e\x31\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x64\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x6e\x32\x2c\x20\x6e\x31\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x22\x62\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x22\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x26\x26\x20\x74\x6f\x67\x67\x6c\x65\x52\x65\x63\x75\x72\x73\x65\x28\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x72\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x53\x56\x47\x20\x3d\x20\x69\x73\x53\x56\x47\x20\x26\x26\x20\x6e\x32\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x22\x66\x6f\x72\x65\x69\x67\x6e\x4f\x62\x6a\x65\x63\x74\x22\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x42\x6c\x6f\x63\x6b\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x31\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x65\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x61\x72\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x65\x6c\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x61\x72\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3e\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x50\x72\x6f\x70\x73\x28\x65\x6c\x2c\x20\x6e\x32\x2c\x20\x6f\x6c\x64\x50\x72\x6f\x70\x73\x2c\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x6c\x64\x50\x72\x6f\x70\x73\x2e\x63\x6c\x61\x73\x73\x20\x21\x3d\x3d\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x2e\x63\x6c\x61\x73\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x50\x61\x74\x63\x68\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x22\x63\x6c\x61\x73\x73\x22\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x2e\x63\x6c\x61\x73\x73\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x50\x61\x74\x63\x68\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x22\x73\x74\x79\x6c\x65\x22\x2c\x20\x6f\x6c\x64\x50\x72\x6f\x70\x73\x2e\x73\x74\x79\x6c\x65\x2c\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x2e\x73\x74\x79\x6c\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x70\x73\x54\x6f\x55\x70\x64\x61\x74\x65\x20\x3d\x20\x6e\x32\x2e\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x70\x72\x6f\x70\x73\x54\x6f\x55\x70\x64\x61\x74\x65\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x3d\x20\x70\x72\x6f\x70\x73\x54\x6f\x55\x70\x64\x61\x74\x65\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x76\x20\x3d\x20\x6f\x6c\x64\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x20\x3d\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x20\x21\x3d\x3d\x20\x70\x72\x65\x76\x20\x7c\x7c\x20\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x76\x61\x6c\x75\x65\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x50\x61\x74\x63\x68\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x70\x72\x65\x76\x2c\x20\x6e\x65\x78\x74\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x6e\x31\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x21\x3d\x3d\x20\x6e\x32\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x53\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x54\x65\x78\x74\x28\x65\x6c\x2c\x20\x6e\x32\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x26\x26\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x50\x72\x6f\x70\x73\x28\x65\x6c\x2c\x20\x6e\x32\x2c\x20\x6f\x6c\x64\x50\x72\x6f\x70\x73\x2c\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x55\x70\x64\x61\x74\x65\x64\x29\x20\x7c\x7c\x20\x64\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x26\x26\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x6e\x32\x2c\x20\x6e\x31\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x69\x72\x73\x20\x26\x26\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x6e\x32\x2c\x20\x6e\x31\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x22\x75\x70\x64\x61\x74\x65\x64\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x74\x63\x68\x42\x6c\x6f\x63\x6b\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x28\x6f\x6c\x64\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x6e\x65\x77\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x6e\x65\x77\x43\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6c\x64\x56\x4e\x6f\x64\x65\x20\x3d\x20\x6f\x6c\x64\x43\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x56\x4e\x6f\x64\x65\x20\x3d\x20\x6e\x65\x77\x43\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x6f\x6c\x64\x56\x4e\x6f\x64\x65\x2e\x65\x6c\x20\x26\x26\x20\x28\x6f\x6c\x64\x56\x4e\x6f\x64\x65\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x20\x7c\x7c\x20\x21\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x6f\x6c\x64\x56\x4e\x6f\x64\x65\x2c\x20\x6e\x65\x77\x56\x4e\x6f\x64\x65\x29\x20\x7c\x7c\x20\x6f\x6c\x64\x56\x4e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x28\x36\x20\x7c\x20\x36\x34\x29\x29\x20\x3f\x20\x68\x6f\x73\x74\x50\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x28\x6f\x6c\x64\x56\x4e\x6f\x64\x65\x2e\x65\x6c\x29\x20\x3a\x20\x66\x61\x6c\x6c\x62\x61\x63\x6b\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6f\x6c\x64\x56\x4e\x6f\x64\x65\x2c\x20\x6e\x65\x77\x56\x4e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x74\x63\x68\x50\x72\x6f\x70\x73\x20\x3d\x20\x28\x65\x6c\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x6f\x6c\x64\x50\x72\x6f\x70\x73\x2c\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x6c\x64\x50\x72\x6f\x70\x73\x20\x21\x3d\x3d\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x73\x65\x72\x76\x65\x64\x50\x72\x6f\x70\x28\x6b\x65\x79\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x69\x6e\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x20\x3d\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x76\x20\x3d\x20\x6f\x6c\x64\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x20\x21\x3d\x3d\x20\x70\x72\x65\x76\x20\x26\x26\x20\x6b\x65\x79\x20\x21\x3d\x3d\x20\x22\x76\x61\x6c\x75\x65\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x50\x61\x74\x63\x68\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x70\x72\x65\x76\x2c\x20\x6e\x65\x78\x74\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x6c\x64\x50\x72\x6f\x70\x73\x20\x21\x3d\x3d\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x6f\x6c\x64\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x52\x65\x73\x65\x72\x76\x65\x64\x50\x72\x6f\x70\x28\x6b\x65\x79\x29\x20\x26\x26\x20\x21\x28\x6b\x65\x79\x20\x69\x6e\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x50\x61\x74\x63\x68\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x6f\x6c\x64\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x22\x76\x61\x6c\x75\x65\x22\x20\x69\x6e\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x50\x61\x74\x63\x68\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x22\x76\x61\x6c\x75\x65\x22\x2c\x20\x6f\x6c\x64\x50\x72\x6f\x70\x73\x2e\x76\x61\x6c\x75\x65\x2c\x20\x6e\x65\x77\x50\x72\x6f\x70\x73\x2e\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x63\x65\x73\x73\x46\x72\x61\x67\x6d\x65\x6e\x74\x20\x3d\x20\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x72\x61\x67\x6d\x65\x6e\x74\x53\x74\x61\x72\x74\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x32\x2e\x65\x6c\x20\x3d\x20\x6e\x31\x20\x3f\x20\x6e\x31\x2e\x65\x6c\x20\x3a\x20\x68\x6f\x73\x74\x43\x72\x65\x61\x74\x65\x54\x65\x78\x74\x28\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x72\x61\x67\x6d\x65\x6e\x74\x45\x6e\x64\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x32\x2e\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x31\x20\x3f\x20\x6e\x31\x2e\x61\x6e\x63\x68\x6f\x72\x20\x3a\x20\x68\x6f\x73\x74\x43\x72\x65\x61\x74\x65\x54\x65\x78\x74\x28\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x7b\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x3a\x20\x66\x72\x61\x67\x6d\x65\x6e\x74\x53\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x20\x7d\x20\x3d\x20\x6e\x32\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x66\x72\x61\x67\x6d\x65\x6e\x74\x53\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x20\x3d\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x20\x3f\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2e\x63\x6f\x6e\x63\x61\x74\x28\x66\x72\x61\x67\x6d\x65\x6e\x74\x53\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x20\x3a\x20\x66\x72\x61\x67\x6d\x65\x6e\x74\x53\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x66\x72\x61\x67\x6d\x65\x6e\x74\x53\x74\x61\x72\x74\x41\x6e\x63\x68\x6f\x72\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x66\x72\x61\x67\x6d\x65\x6e\x74\x45\x6e\x64\x41\x6e\x63\x68\x6f\x72\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x32\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x66\x72\x61\x67\x6d\x65\x6e\x74\x45\x6e\x64\x41\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3e\x20\x30\x20\x26\x26\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x36\x34\x20\x26\x26\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x26\x26\x20\x6e\x31\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x42\x6c\x6f\x63\x6b\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x31\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x32\x2e\x6b\x65\x79\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x20\x7c\x7c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x26\x26\x20\x6e\x32\x20\x3d\x3d\x3d\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x73\x75\x62\x54\x72\x65\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x76\x65\x72\x73\x65\x53\x74\x61\x74\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x66\x72\x61\x67\x6d\x65\x6e\x74\x45\x6e\x64\x41\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x63\x65\x73\x73\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6e\x32\x2e\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x20\x3d\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x32\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x35\x31\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x63\x74\x78\x2e\x61\x63\x74\x69\x76\x61\x74\x65\x28\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x75\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x28\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x28\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x63\x74\x78\x2e\x72\x65\x6e\x64\x65\x72\x65\x72\x20\x3d\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x75\x70\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x73\x79\x6e\x63\x44\x65\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x26\x26\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2e\x72\x65\x67\x69\x73\x74\x65\x72\x44\x65\x70\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x73\x65\x74\x75\x70\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x2e\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x43\x6f\x6d\x6d\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x63\x65\x73\x73\x43\x6f\x6d\x6d\x65\x6e\x74\x4e\x6f\x64\x65\x28\x6e\x75\x6c\x6c\x2c\x20\x70\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x73\x65\x74\x75\x70\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x75\x70\x64\x61\x74\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x6e\x32\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x6e\x31\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x6f\x75\x6c\x64\x55\x70\x64\x61\x74\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x73\x79\x6e\x63\x44\x65\x70\x20\x26\x26\x20\x21\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x73\x79\x6e\x63\x52\x65\x73\x6f\x6c\x76\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x50\x72\x65\x52\x65\x6e\x64\x65\x72\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x6e\x32\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x6e\x65\x78\x74\x20\x3d\x20\x6e\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x61\x6c\x69\x64\x61\x74\x65\x4a\x6f\x62\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x75\x70\x64\x61\x74\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x75\x70\x64\x61\x74\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x32\x2e\x65\x6c\x20\x3d\x20\x6e\x31\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x20\x3d\x20\x6e\x32\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x74\x75\x70\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x20\x3d\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x55\x70\x64\x61\x74\x65\x46\x6e\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x65\x6c\x2c\x20\x70\x72\x6f\x70\x73\x20\x7d\x20\x3d\x20\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x62\x6d\x2c\x20\x6d\x2c\x20\x70\x61\x72\x65\x6e\x74\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x56\x4e\x6f\x64\x65\x20\x3d\x20\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x28\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x6f\x67\x67\x6c\x65\x52\x65\x63\x75\x72\x73\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x62\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x41\x72\x72\x61\x79\x46\x6e\x73\x28\x62\x6d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x56\x4e\x6f\x64\x65\x20\x26\x26\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x42\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x70\x61\x72\x65\x6e\x74\x2c\x20\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x6f\x67\x67\x6c\x65\x52\x65\x63\x75\x72\x73\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x6c\x20\x26\x26\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x79\x64\x72\x61\x74\x65\x53\x75\x62\x54\x72\x65\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x52\x6f\x6f\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x28\x65\x6c\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x56\x4e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2e\x5f\x5f\x61\x73\x79\x6e\x63\x4c\x6f\x61\x64\x65\x72\x28\x29\x2e\x74\x68\x65\x6e\x28\x28\x29\x20\x3d\x3e\x20\x21\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x20\x26\x26\x20\x68\x79\x64\x72\x61\x74\x65\x53\x75\x62\x54\x72\x65\x65\x28\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x79\x64\x72\x61\x74\x65\x53\x75\x62\x54\x72\x65\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x52\x6f\x6f\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x73\x75\x62\x54\x72\x65\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x2e\x65\x6c\x20\x3d\x20\x73\x75\x62\x54\x72\x65\x65\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x6d\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x56\x4e\x6f\x64\x65\x20\x26\x26\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x4d\x6f\x75\x6e\x74\x65\x64\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x63\x6f\x70\x65\x64\x49\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x20\x3d\x20\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x28\x29\x20\x3d\x3e\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x70\x61\x72\x65\x6e\x74\x2c\x20\x73\x63\x6f\x70\x65\x64\x49\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x29\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x32\x35\x36\x20\x7c\x7c\x20\x70\x61\x72\x65\x6e\x74\x20\x26\x26\x20\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x28\x70\x61\x72\x65\x6e\x74\x2e\x76\x6e\x6f\x64\x65\x29\x20\x26\x26\x20\x70\x61\x72\x65\x6e\x74\x2e\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x32\x35\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x20\x26\x26\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x69\x74\x69\x61\x6c\x56\x4e\x6f\x64\x65\x20\x3d\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x7b\x20\x6e\x65\x78\x74\x2c\x20\x62\x75\x2c\x20\x75\x2c\x20\x70\x61\x72\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x6f\x72\x69\x67\x69\x6e\x4e\x65\x78\x74\x20\x3d\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x6f\x67\x67\x6c\x65\x52\x65\x63\x75\x72\x73\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x2e\x65\x6c\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x50\x72\x65\x52\x65\x6e\x64\x65\x72\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x6e\x65\x78\x74\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x62\x75\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x41\x72\x72\x61\x79\x46\x6e\x73\x28\x62\x75\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x6e\x65\x78\x74\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x6e\x65\x78\x74\x2e\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x42\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x70\x61\x72\x65\x6e\x74\x2c\x20\x6e\x65\x78\x74\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x6f\x67\x67\x6c\x65\x52\x65\x63\x75\x72\x73\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x54\x72\x65\x65\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x52\x6f\x6f\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x76\x54\x72\x65\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x20\x3d\x20\x6e\x65\x78\x74\x54\x72\x65\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x70\x72\x65\x76\x54\x72\x65\x65\x2c\x20\x6e\x65\x78\x74\x54\x72\x65\x65\x2c\x20\x68\x6f\x73\x74\x50\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x28\x70\x72\x65\x76\x54\x72\x65\x65\x2e\x65\x6c\x29\x2c\x20\x67\x65\x74\x4e\x65\x78\x74\x48\x6f\x73\x74\x4e\x6f\x64\x65\x28\x70\x72\x65\x76\x54\x72\x65\x65\x29\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x2e\x65\x6c\x20\x3d\x20\x6e\x65\x78\x74\x54\x72\x65\x65\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x72\x69\x67\x69\x6e\x4e\x65\x78\x74\x20\x3d\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x48\x4f\x43\x48\x6f\x73\x74\x45\x6c\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x6e\x65\x78\x74\x54\x72\x65\x65\x2e\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x75\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x75\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x6e\x65\x78\x74\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x6e\x65\x78\x74\x2e\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x55\x70\x64\x61\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x28\x29\x20\x3d\x3e\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x70\x61\x72\x65\x6e\x74\x2c\x20\x6e\x65\x78\x74\x2c\x20\x76\x6e\x6f\x64\x65\x29\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x66\x66\x65\x63\x74\x32\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x66\x66\x65\x63\x74\x20\x3d\x20\x6e\x65\x77\x20\x52\x65\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x28\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x55\x70\x64\x61\x74\x65\x46\x6e\x2c\x20\x28\x29\x20\x3d\x3e\x20\x71\x75\x65\x75\x65\x4a\x6f\x62\x28\x75\x70\x64\x61\x74\x65\x29\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x63\x6f\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x75\x70\x64\x61\x74\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x75\x70\x64\x61\x74\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x72\x75\x6e\x28\x29\x3b\x0a\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x2e\x69\x64\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x75\x69\x64\x3b\x0a\x20\x20\x20\x20\x74\x6f\x67\x67\x6c\x65\x52\x65\x63\x75\x72\x73\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x28\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x75\x70\x64\x61\x74\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x50\x72\x65\x52\x65\x6e\x64\x65\x72\x20\x3d\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x6e\x65\x78\x74\x56\x4e\x6f\x64\x65\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6e\x65\x78\x74\x56\x4e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x20\x3d\x20\x6e\x65\x78\x74\x56\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x6e\x65\x78\x74\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x50\x72\x6f\x70\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x6e\x65\x78\x74\x56\x4e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2c\x20\x70\x72\x65\x76\x50\x72\x6f\x70\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x53\x6c\x6f\x74\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x6e\x65\x78\x74\x56\x4e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x70\x61\x75\x73\x65\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x66\x6c\x75\x73\x68\x50\x72\x65\x46\x6c\x75\x73\x68\x43\x62\x73\x28\x76\x6f\x69\x64\x20\x30\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x75\x70\x64\x61\x74\x65\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x73\x65\x74\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x74\x63\x68\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x31\x20\x3d\x20\x6e\x31\x20\x26\x26\x20\x6e\x31\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x76\x53\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x3d\x20\x6e\x31\x20\x3f\x20\x6e\x31\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x3a\x20\x30\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x32\x20\x3d\x20\x6e\x32\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x7d\x20\x3d\x20\x6e\x32\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3e\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x4b\x65\x79\x65\x64\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x31\x2c\x20\x63\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x32\x35\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x55\x6e\x6b\x65\x79\x65\x64\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x31\x2c\x20\x63\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x53\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x31\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x32\x20\x21\x3d\x3d\x20\x63\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x53\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x54\x65\x78\x74\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x63\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x53\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x4b\x65\x79\x65\x64\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x31\x2c\x20\x63\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x31\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x53\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x53\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x54\x65\x78\x74\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x74\x63\x68\x55\x6e\x6b\x65\x79\x65\x64\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x28\x63\x31\x2c\x20\x63\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x31\x20\x3d\x20\x63\x31\x20\x7c\x7c\x20\x45\x4d\x50\x54\x59\x5f\x41\x52\x52\x3b\x0a\x20\x20\x20\x20\x63\x32\x20\x3d\x20\x63\x32\x20\x7c\x7c\x20\x45\x4d\x50\x54\x59\x5f\x41\x52\x52\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6c\x64\x4c\x65\x6e\x67\x74\x68\x20\x3d\x20\x63\x31\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x4c\x65\x6e\x67\x74\x68\x20\x3d\x20\x63\x32\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6d\x6d\x6f\x6e\x4c\x65\x6e\x67\x74\x68\x20\x3d\x20\x4d\x61\x74\x68\x2e\x6d\x69\x6e\x28\x6f\x6c\x64\x4c\x65\x6e\x67\x74\x68\x2c\x20\x6e\x65\x77\x4c\x65\x6e\x67\x74\x68\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x69\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x63\x6f\x6d\x6d\x6f\x6e\x4c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x20\x3d\x20\x63\x32\x5b\x69\x5d\x20\x3d\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3f\x20\x63\x6c\x6f\x6e\x65\x49\x66\x4d\x6f\x75\x6e\x74\x65\x64\x28\x63\x32\x5b\x69\x5d\x29\x20\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x63\x32\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x63\x31\x5b\x69\x5d\x2c\x20\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x6c\x64\x4c\x65\x6e\x67\x74\x68\x20\x3e\x20\x6e\x65\x77\x4c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x31\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x74\x72\x75\x65\x2c\x20\x66\x61\x6c\x73\x65\x2c\x20\x63\x6f\x6d\x6d\x6f\x6e\x4c\x65\x6e\x67\x74\x68\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x63\x6f\x6d\x6d\x6f\x6e\x4c\x65\x6e\x67\x74\x68\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x74\x63\x68\x4b\x65\x79\x65\x64\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x28\x63\x31\x2c\x20\x63\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x41\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x32\x20\x3d\x20\x63\x32\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x65\x31\x20\x3d\x20\x63\x31\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2d\x20\x31\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x65\x32\x20\x3d\x20\x6c\x32\x20\x2d\x20\x31\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x69\x20\x3c\x3d\x20\x65\x31\x20\x26\x26\x20\x69\x20\x3c\x3d\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x31\x20\x3d\x20\x63\x31\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x32\x20\x3d\x20\x63\x32\x5b\x69\x5d\x20\x3d\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3f\x20\x63\x6c\x6f\x6e\x65\x49\x66\x4d\x6f\x75\x6e\x74\x65\x64\x28\x63\x32\x5b\x69\x5d\x29\x20\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x63\x32\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x6e\x31\x2c\x20\x6e\x32\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x69\x20\x3c\x3d\x20\x65\x31\x20\x26\x26\x20\x69\x20\x3c\x3d\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x31\x20\x3d\x20\x63\x31\x5b\x65\x31\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x32\x20\x3d\x20\x63\x32\x5b\x65\x32\x5d\x20\x3d\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3f\x20\x63\x6c\x6f\x6e\x65\x49\x66\x4d\x6f\x75\x6e\x74\x65\x64\x28\x63\x32\x5b\x65\x32\x5d\x29\x20\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x63\x32\x5b\x65\x32\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x6e\x31\x2c\x20\x6e\x32\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x65\x31\x2d\x2d\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x32\x2d\x2d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x20\x3e\x20\x65\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x20\x3c\x3d\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x50\x6f\x73\x20\x3d\x20\x65\x32\x20\x2b\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x65\x78\x74\x50\x6f\x73\x20\x3c\x20\x6c\x32\x20\x3f\x20\x63\x32\x5b\x6e\x65\x78\x74\x50\x6f\x73\x5d\x2e\x65\x6c\x20\x3a\x20\x70\x61\x72\x65\x6e\x74\x41\x6e\x63\x68\x6f\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x69\x20\x3c\x3d\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x63\x32\x5b\x69\x5d\x20\x3d\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3f\x20\x63\x6c\x6f\x6e\x65\x49\x66\x4d\x6f\x75\x6e\x74\x65\x64\x28\x63\x32\x5b\x69\x5d\x29\x20\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x63\x32\x5b\x69\x5d\x29\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x20\x3e\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x69\x20\x3c\x3d\x20\x65\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x63\x31\x5b\x69\x5d\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x31\x20\x3d\x20\x69\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x32\x20\x3d\x20\x69\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x54\x6f\x4e\x65\x77\x49\x6e\x64\x65\x78\x4d\x61\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x4d\x61\x70\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x69\x20\x3d\x20\x73\x32\x3b\x20\x69\x20\x3c\x3d\x20\x65\x32\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x20\x3d\x20\x63\x32\x5b\x69\x5d\x20\x3d\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3f\x20\x63\x6c\x6f\x6e\x65\x49\x66\x4d\x6f\x75\x6e\x74\x65\x64\x28\x63\x32\x5b\x69\x5d\x29\x20\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x63\x32\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x2e\x6b\x65\x79\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6b\x65\x79\x54\x6f\x4e\x65\x77\x49\x6e\x64\x65\x78\x4d\x61\x70\x2e\x73\x65\x74\x28\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x2e\x6b\x65\x79\x2c\x20\x69\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x6a\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x70\x61\x74\x63\x68\x65\x64\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x6f\x42\x65\x50\x61\x74\x63\x68\x65\x64\x20\x3d\x20\x65\x32\x20\x2d\x20\x73\x32\x20\x2b\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x6d\x6f\x76\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x6d\x61\x78\x4e\x65\x77\x49\x6e\x64\x65\x78\x53\x6f\x46\x61\x72\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x49\x6e\x64\x65\x78\x54\x6f\x4f\x6c\x64\x49\x6e\x64\x65\x78\x4d\x61\x70\x20\x3d\x20\x6e\x65\x77\x20\x41\x72\x72\x61\x79\x28\x74\x6f\x42\x65\x50\x61\x74\x63\x68\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x74\x6f\x42\x65\x50\x61\x74\x63\x68\x65\x64\x3b\x20\x69\x2b\x2b\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x77\x49\x6e\x64\x65\x78\x54\x6f\x4f\x6c\x64\x49\x6e\x64\x65\x78\x4d\x61\x70\x5b\x69\x5d\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x69\x20\x3d\x20\x73\x31\x3b\x20\x69\x20\x3c\x3d\x20\x65\x31\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x20\x3d\x20\x63\x31\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x74\x63\x68\x65\x64\x20\x3e\x3d\x20\x74\x6f\x42\x65\x50\x61\x74\x63\x68\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x69\x6e\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x6e\x65\x77\x49\x6e\x64\x65\x78\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x2e\x6b\x65\x79\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x77\x49\x6e\x64\x65\x78\x20\x3d\x20\x6b\x65\x79\x54\x6f\x4e\x65\x77\x49\x6e\x64\x65\x78\x4d\x61\x70\x2e\x67\x65\x74\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x2e\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6a\x20\x3d\x20\x73\x32\x3b\x20\x6a\x20\x3c\x3d\x20\x65\x32\x3b\x20\x6a\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x77\x49\x6e\x64\x65\x78\x54\x6f\x4f\x6c\x64\x49\x6e\x64\x65\x78\x4d\x61\x70\x5b\x6a\x20\x2d\x20\x73\x32\x5d\x20\x3d\x3d\x3d\x20\x30\x20\x26\x26\x20\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x2c\x20\x63\x32\x5b\x6a\x5d\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x77\x49\x6e\x64\x65\x78\x20\x3d\x20\x6a\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x77\x49\x6e\x64\x65\x78\x20\x3d\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x65\x77\x49\x6e\x64\x65\x78\x54\x6f\x4f\x6c\x64\x49\x6e\x64\x65\x78\x4d\x61\x70\x5b\x6e\x65\x77\x49\x6e\x64\x65\x78\x20\x2d\x20\x73\x32\x5d\x20\x3d\x20\x69\x20\x2b\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x77\x49\x6e\x64\x65\x78\x20\x3e\x3d\x20\x6d\x61\x78\x4e\x65\x77\x49\x6e\x64\x65\x78\x53\x6f\x46\x61\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x61\x78\x4e\x65\x77\x49\x6e\x64\x65\x78\x53\x6f\x46\x61\x72\x20\x3d\x20\x6e\x65\x77\x49\x6e\x64\x65\x78\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x2c\x20\x63\x32\x5b\x6e\x65\x77\x49\x6e\x64\x65\x78\x5d\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x65\x64\x2b\x2b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x63\x72\x65\x61\x73\x69\x6e\x67\x4e\x65\x77\x49\x6e\x64\x65\x78\x53\x65\x71\x75\x65\x6e\x63\x65\x20\x3d\x20\x6d\x6f\x76\x65\x64\x20\x3f\x20\x67\x65\x74\x53\x65\x71\x75\x65\x6e\x63\x65\x28\x6e\x65\x77\x49\x6e\x64\x65\x78\x54\x6f\x4f\x6c\x64\x49\x6e\x64\x65\x78\x4d\x61\x70\x29\x20\x3a\x20\x45\x4d\x50\x54\x59\x5f\x41\x52\x52\x3b\x0a\x20\x20\x20\x20\x20\x20\x6a\x20\x3d\x20\x69\x6e\x63\x72\x65\x61\x73\x69\x6e\x67\x4e\x65\x77\x49\x6e\x64\x65\x78\x53\x65\x71\x75\x65\x6e\x63\x65\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2d\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x69\x20\x3d\x20\x74\x6f\x42\x65\x50\x61\x74\x63\x68\x65\x64\x20\x2d\x20\x31\x3b\x20\x69\x20\x3e\x3d\x20\x30\x3b\x20\x69\x2d\x2d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x49\x6e\x64\x65\x78\x20\x3d\x20\x73\x32\x20\x2b\x20\x69\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x20\x3d\x20\x63\x32\x5b\x6e\x65\x78\x74\x49\x6e\x64\x65\x78\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x65\x78\x74\x49\x6e\x64\x65\x78\x20\x2b\x20\x31\x20\x3c\x20\x6c\x32\x20\x3f\x20\x63\x32\x5b\x6e\x65\x78\x74\x49\x6e\x64\x65\x78\x20\x2b\x20\x31\x5d\x2e\x65\x6c\x20\x3a\x20\x70\x61\x72\x65\x6e\x74\x41\x6e\x63\x68\x6f\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x77\x49\x6e\x64\x65\x78\x54\x6f\x4f\x6c\x64\x49\x6e\x64\x65\x78\x4d\x61\x70\x5b\x69\x5d\x20\x3d\x3d\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x6e\x75\x6c\x6c\x2c\x20\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6d\x6f\x76\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6a\x20\x3c\x20\x30\x20\x7c\x7c\x20\x69\x20\x21\x3d\x3d\x20\x69\x6e\x63\x72\x65\x61\x73\x69\x6e\x67\x4e\x65\x77\x49\x6e\x64\x65\x78\x53\x65\x71\x75\x65\x6e\x63\x65\x5b\x6a\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x28\x6e\x65\x78\x74\x43\x68\x69\x6c\x64\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6a\x2d\x2d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x76\x65\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x6d\x6f\x76\x65\x54\x79\x70\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x65\x6c\x2c\x20\x74\x79\x70\x65\x2c\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x28\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x73\x75\x62\x54\x72\x65\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x6d\x6f\x76\x65\x54\x79\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x6d\x6f\x76\x65\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x6d\x6f\x76\x65\x54\x79\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x2e\x6d\x6f\x76\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x65\x6c\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x6d\x6f\x76\x65\x54\x79\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x76\x6e\x6f\x64\x65\x2e\x61\x6e\x63\x68\x6f\x72\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x53\x74\x61\x74\x69\x63\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x53\x74\x61\x74\x69\x63\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x65\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x3d\x20\x6d\x6f\x76\x65\x54\x79\x70\x65\x20\x21\x3d\x3d\x20\x32\x20\x26\x26\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x20\x26\x26\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x65\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6d\x6f\x76\x65\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x62\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x65\x6c\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x28\x29\x20\x3d\x3e\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x65\x6e\x74\x65\x72\x28\x65\x6c\x29\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6c\x65\x61\x76\x65\x2c\x20\x64\x65\x6c\x61\x79\x4c\x65\x61\x76\x65\x2c\x20\x61\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x20\x7d\x20\x3d\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x6d\x6f\x76\x65\x33\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x65\x6c\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x65\x72\x66\x6f\x72\x6d\x4c\x65\x61\x76\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x61\x76\x65\x28\x65\x6c\x2c\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x33\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x20\x26\x26\x20\x61\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x65\x6c\x61\x79\x4c\x65\x61\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x61\x79\x4c\x65\x61\x76\x65\x28\x65\x6c\x2c\x20\x72\x65\x6d\x6f\x76\x65\x33\x2c\x20\x70\x65\x72\x66\x6f\x72\x6d\x4c\x65\x61\x76\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x65\x72\x66\x6f\x72\x6d\x4c\x65\x61\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x49\x6e\x73\x65\x72\x74\x28\x65\x6c\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x72\x65\x66\x3a\x20\x72\x65\x66\x32\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x64\x69\x72\x73\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x72\x65\x66\x32\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x52\x65\x66\x28\x72\x65\x66\x32\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x32\x35\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x63\x74\x78\x2e\x64\x65\x61\x63\x74\x69\x76\x61\x74\x65\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x68\x6f\x75\x6c\x64\x49\x6e\x76\x6f\x6b\x65\x44\x69\x72\x73\x20\x3d\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x20\x26\x26\x20\x64\x69\x72\x73\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x68\x6f\x75\x6c\x64\x49\x6e\x76\x6f\x6b\x65\x56\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x21\x69\x73\x41\x73\x79\x6e\x63\x57\x72\x61\x70\x70\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x6f\x75\x6c\x64\x49\x6e\x76\x6f\x6b\x65\x56\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x26\x26\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x42\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x6f\x75\x6c\x64\x49\x6e\x76\x6f\x6b\x65\x44\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x22\x62\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2e\x72\x65\x6d\x6f\x76\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x26\x26\x20\x28\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x20\x7c\x7c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3e\x20\x30\x20\x26\x26\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x36\x34\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x66\x61\x6c\x73\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x20\x26\x26\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x26\x20\x28\x31\x32\x38\x20\x7c\x20\x32\x35\x36\x29\x20\x7c\x7c\x20\x21\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x26\x26\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x6f\x52\x65\x6d\x6f\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x32\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x6f\x75\x6c\x64\x49\x6e\x76\x6f\x6b\x65\x56\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x26\x26\x20\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x3d\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x2e\x6f\x6e\x56\x6e\x6f\x64\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x29\x20\x7c\x7c\x20\x73\x68\x6f\x75\x6c\x64\x49\x6e\x76\x6f\x6b\x65\x44\x69\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x20\x26\x26\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x48\x6f\x6f\x6b\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x68\x6f\x75\x6c\x64\x49\x6e\x76\x6f\x6b\x65\x44\x69\x72\x73\x20\x26\x26\x20\x69\x6e\x76\x6f\x6b\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x48\x6f\x6f\x6b\x28\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x22\x75\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x6d\x6f\x76\x65\x32\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x74\x79\x70\x65\x2c\x20\x65\x6c\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x46\x72\x61\x67\x6d\x65\x6e\x74\x28\x65\x6c\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x53\x74\x61\x74\x69\x63\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x53\x74\x61\x74\x69\x63\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x65\x72\x66\x6f\x72\x6d\x52\x65\x6d\x6f\x76\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x52\x65\x6d\x6f\x76\x65\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x26\x26\x20\x21\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x70\x65\x72\x73\x69\x73\x74\x65\x64\x20\x26\x26\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x61\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x61\x66\x74\x65\x72\x4c\x65\x61\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x20\x26\x26\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x26\x26\x20\x21\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x70\x65\x72\x73\x69\x73\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6c\x65\x61\x76\x65\x2c\x20\x64\x65\x6c\x61\x79\x4c\x65\x61\x76\x65\x20\x7d\x20\x3d\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x65\x72\x66\x6f\x72\x6d\x4c\x65\x61\x76\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x6c\x65\x61\x76\x65\x28\x65\x6c\x2c\x20\x70\x65\x72\x66\x6f\x72\x6d\x52\x65\x6d\x6f\x76\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x65\x6c\x61\x79\x4c\x65\x61\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x61\x79\x4c\x65\x61\x76\x65\x28\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x2c\x20\x70\x65\x72\x66\x6f\x72\x6d\x52\x65\x6d\x6f\x76\x65\x2c\x20\x70\x65\x72\x66\x6f\x72\x6d\x4c\x65\x61\x76\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x65\x72\x66\x6f\x72\x6d\x4c\x65\x61\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x65\x72\x66\x6f\x72\x6d\x52\x65\x6d\x6f\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x6d\x6f\x76\x65\x46\x72\x61\x67\x6d\x65\x6e\x74\x20\x3d\x20\x28\x63\x75\x72\x2c\x20\x65\x6e\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x63\x75\x72\x20\x21\x3d\x3d\x20\x65\x6e\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x20\x3d\x20\x68\x6f\x73\x74\x4e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x63\x75\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x52\x65\x6d\x6f\x76\x65\x28\x63\x75\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x75\x72\x20\x3d\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x68\x6f\x73\x74\x52\x65\x6d\x6f\x76\x65\x28\x65\x6e\x64\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x62\x75\x6d\x2c\x20\x73\x63\x6f\x70\x65\x2c\x20\x75\x70\x64\x61\x74\x65\x2c\x20\x73\x75\x62\x54\x72\x65\x65\x2c\x20\x75\x6d\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x62\x75\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x41\x72\x72\x61\x79\x46\x6e\x73\x28\x62\x75\x6d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x73\x63\x6f\x70\x65\x2e\x73\x74\x6f\x70\x28\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x75\x70\x64\x61\x74\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x2e\x61\x63\x74\x69\x76\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x73\x75\x62\x54\x72\x65\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x75\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x75\x6d\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x52\x65\x6e\x64\x65\x72\x45\x66\x66\x65\x63\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x20\x26\x26\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x20\x26\x26\x20\x21\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2e\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x73\x79\x6e\x63\x44\x65\x70\x20\x26\x26\x20\x21\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x73\x79\x6e\x63\x52\x65\x73\x6f\x6c\x76\x65\x64\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x49\x64\x20\x3d\x3d\x3d\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x2d\x2d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2e\x64\x65\x70\x73\x20\x3d\x3d\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x2c\x20\x73\x74\x61\x72\x74\x20\x3d\x20\x30\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x73\x74\x61\x72\x74\x3b\x20\x69\x20\x3c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x4e\x65\x78\x74\x48\x6f\x73\x74\x4e\x6f\x64\x65\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x4e\x65\x78\x74\x48\x6f\x73\x74\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x73\x75\x62\x54\x72\x65\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x6e\x65\x78\x74\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x6f\x73\x74\x4e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x76\x6e\x6f\x64\x65\x2e\x61\x6e\x63\x68\x6f\x72\x20\x7c\x7c\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x6e\x64\x65\x72\x32\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x69\x73\x53\x56\x47\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x5f\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x5f\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x5f\x76\x6e\x6f\x64\x65\x20\x7c\x7c\x20\x6e\x75\x6c\x6c\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x66\x6c\x75\x73\x68\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x73\x28\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x5f\x76\x6e\x6f\x64\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x70\x3a\x20\x70\x61\x74\x63\x68\x2c\x0a\x20\x20\x20\x20\x75\x6d\x3a\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x2c\x0a\x20\x20\x20\x20\x6d\x3a\x20\x6d\x6f\x76\x65\x2c\x0a\x20\x20\x20\x20\x72\x3a\x20\x72\x65\x6d\x6f\x76\x65\x32\x2c\x0a\x20\x20\x20\x20\x6d\x74\x3a\x20\x6d\x6f\x75\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x20\x20\x6d\x63\x3a\x20\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x0a\x20\x20\x20\x20\x70\x63\x3a\x20\x70\x61\x74\x63\x68\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x0a\x20\x20\x20\x20\x70\x62\x63\x3a\x20\x70\x61\x74\x63\x68\x42\x6c\x6f\x63\x6b\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x0a\x20\x20\x20\x20\x6e\x3a\x20\x67\x65\x74\x4e\x65\x78\x74\x48\x6f\x73\x74\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x20\x20\x6f\x3a\x20\x6f\x70\x74\x69\x6f\x6e\x73\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x6c\x65\x74\x20\x68\x79\x64\x72\x61\x74\x65\x32\x3b\x0a\x20\x20\x6c\x65\x74\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x63\x72\x65\x61\x74\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x46\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x5b\x68\x79\x64\x72\x61\x74\x65\x32\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x4e\x6f\x64\x65\x5d\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x46\x6e\x73\x28\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x3a\x20\x72\x65\x6e\x64\x65\x72\x32\x2c\x0a\x20\x20\x20\x20\x68\x79\x64\x72\x61\x74\x65\x3a\x20\x68\x79\x64\x72\x61\x74\x65\x32\x2c\x0a\x20\x20\x20\x20\x63\x72\x65\x61\x74\x65\x41\x70\x70\x3a\x20\x63\x72\x65\x61\x74\x65\x41\x70\x70\x41\x50\x49\x28\x72\x65\x6e\x64\x65\x72\x32\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x32\x29\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x6f\x67\x67\x6c\x65\x52\x65\x63\x75\x72\x73\x65\x28\x7b\x20\x65\x66\x66\x65\x63\x74\x3a\x20\x65\x66\x66\x65\x63\x74\x32\x2c\x20\x75\x70\x64\x61\x74\x65\x20\x7d\x2c\x20\x61\x6c\x6c\x6f\x77\x65\x64\x29\x20\x7b\x0a\x20\x20\x65\x66\x66\x65\x63\x74\x32\x2e\x61\x6c\x6c\x6f\x77\x52\x65\x63\x75\x72\x73\x65\x20\x3d\x20\x75\x70\x64\x61\x74\x65\x2e\x61\x6c\x6c\x6f\x77\x52\x65\x63\x75\x72\x73\x65\x20\x3d\x20\x61\x6c\x6c\x6f\x77\x65\x64\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x61\x76\x65\x72\x73\x65\x53\x74\x61\x74\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x73\x68\x61\x6c\x6c\x6f\x77\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x31\x20\x3d\x20\x6e\x31\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x32\x20\x3d\x20\x6e\x32\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x63\x68\x31\x29\x20\x26\x26\x20\x69\x73\x41\x72\x72\x61\x79\x28\x63\x68\x32\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x63\x68\x31\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x31\x20\x3d\x20\x63\x68\x31\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x32\x20\x3d\x20\x63\x68\x32\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x32\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x20\x26\x26\x20\x21\x63\x32\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x32\x2e\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3c\x3d\x20\x30\x20\x7c\x7c\x20\x63\x32\x2e\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3d\x3d\x3d\x20\x33\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x32\x20\x3d\x20\x63\x68\x32\x5b\x69\x5d\x20\x3d\x20\x63\x6c\x6f\x6e\x65\x49\x66\x4d\x6f\x75\x6e\x74\x65\x64\x28\x63\x68\x32\x5b\x69\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x32\x2e\x65\x6c\x20\x3d\x20\x63\x31\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x73\x68\x61\x6c\x6c\x6f\x77\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x76\x65\x72\x73\x65\x53\x74\x61\x74\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x31\x2c\x20\x63\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x53\x65\x71\x75\x65\x6e\x63\x65\x28\x61\x72\x72\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x32\x20\x3d\x20\x61\x72\x72\x2e\x73\x6c\x69\x63\x65\x28\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x3d\x20\x5b\x30\x5d\x3b\x0a\x20\x20\x6c\x65\x74\x20\x69\x2c\x20\x6a\x2c\x20\x75\x2c\x20\x76\x2c\x20\x63\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x65\x6e\x20\x3d\x20\x61\x72\x72\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x6c\x65\x6e\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x72\x72\x49\x20\x3d\x20\x61\x72\x72\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x61\x72\x72\x49\x20\x21\x3d\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6a\x20\x3d\x20\x72\x65\x73\x75\x6c\x74\x5b\x72\x65\x73\x75\x6c\x74\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2d\x20\x31\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x61\x72\x72\x5b\x6a\x5d\x20\x3c\x20\x61\x72\x72\x49\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x32\x5b\x69\x5d\x20\x3d\x20\x6a\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x73\x75\x6c\x74\x2e\x70\x75\x73\x68\x28\x69\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x69\x6e\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x75\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x76\x20\x3d\x20\x72\x65\x73\x75\x6c\x74\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2d\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x75\x20\x3c\x20\x76\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x20\x3d\x20\x75\x20\x2b\x20\x76\x20\x3e\x3e\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x61\x72\x72\x5b\x72\x65\x73\x75\x6c\x74\x5b\x63\x5d\x5d\x20\x3c\x20\x61\x72\x72\x49\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x75\x20\x3d\x20\x63\x20\x2b\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x20\x3d\x20\x63\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x61\x72\x72\x49\x20\x3c\x20\x61\x72\x72\x5b\x72\x65\x73\x75\x6c\x74\x5b\x75\x5d\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x75\x20\x3e\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x32\x5b\x69\x5d\x20\x3d\x20\x72\x65\x73\x75\x6c\x74\x5b\x75\x20\x2d\x20\x31\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x73\x75\x6c\x74\x5b\x75\x5d\x20\x3d\x20\x69\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x75\x20\x3d\x20\x72\x65\x73\x75\x6c\x74\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x76\x20\x3d\x20\x72\x65\x73\x75\x6c\x74\x5b\x75\x20\x2d\x20\x31\x5d\x3b\x0a\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x75\x2d\x2d\x20\x3e\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x73\x75\x6c\x74\x5b\x75\x5d\x20\x3d\x20\x76\x3b\x0a\x20\x20\x20\x20\x76\x20\x3d\x20\x70\x32\x5b\x76\x5d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x75\x6c\x74\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x54\x65\x6c\x65\x70\x6f\x72\x74\x20\x3d\x20\x28\x74\x79\x70\x65\x29\x20\x3d\x3e\x20\x74\x79\x70\x65\x2e\x5f\x5f\x69\x73\x54\x65\x6c\x65\x70\x6f\x72\x74\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x54\x65\x6c\x65\x70\x6f\x72\x74\x44\x69\x73\x61\x62\x6c\x65\x64\x20\x3d\x20\x28\x70\x72\x6f\x70\x73\x29\x20\x3d\x3e\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x28\x70\x72\x6f\x70\x73\x2e\x64\x69\x73\x61\x62\x6c\x65\x64\x20\x7c\x7c\x20\x70\x72\x6f\x70\x73\x2e\x64\x69\x73\x61\x62\x6c\x65\x64\x20\x3d\x3d\x3d\x20\x22\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x54\x61\x72\x67\x65\x74\x53\x56\x47\x20\x3d\x20\x28\x74\x61\x72\x67\x65\x74\x29\x20\x3d\x3e\x20\x74\x79\x70\x65\x6f\x66\x20\x53\x56\x47\x45\x6c\x65\x6d\x65\x6e\x74\x20\x21\x3d\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x26\x26\x20\x74\x61\x72\x67\x65\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x6f\x66\x20\x53\x56\x47\x45\x6c\x65\x6d\x65\x6e\x74\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x61\x72\x67\x65\x74\x20\x3d\x20\x28\x70\x72\x6f\x70\x73\x2c\x20\x73\x65\x6c\x65\x63\x74\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x53\x65\x6c\x65\x63\x74\x6f\x72\x20\x3d\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x2e\x74\x6f\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x74\x61\x72\x67\x65\x74\x53\x65\x6c\x65\x63\x74\x6f\x72\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x73\x65\x6c\x65\x63\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x73\x65\x6c\x65\x63\x74\x28\x74\x61\x72\x67\x65\x74\x53\x65\x6c\x65\x63\x74\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x53\x65\x6c\x65\x63\x74\x6f\x72\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x54\x65\x6c\x65\x70\x6f\x72\x74\x49\x6d\x70\x6c\x20\x3d\x20\x7b\x0a\x20\x20\x5f\x5f\x69\x73\x54\x65\x6c\x65\x70\x6f\x72\x74\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x70\x72\x6f\x63\x65\x73\x73\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6d\x63\x3a\x20\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x63\x3a\x20\x70\x61\x74\x63\x68\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x62\x63\x3a\x20\x70\x61\x74\x63\x68\x42\x6c\x6f\x63\x6b\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x6f\x3a\x20\x7b\x20\x69\x6e\x73\x65\x72\x74\x2c\x20\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72\x2c\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x2c\x20\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x6d\x65\x6e\x74\x20\x7d\x20\x7d\x20\x3d\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x69\x73\x61\x62\x6c\x65\x64\x20\x3d\x20\x69\x73\x54\x65\x6c\x65\x70\x6f\x72\x74\x44\x69\x73\x61\x62\x6c\x65\x64\x28\x6e\x32\x2e\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x7b\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x7d\x20\x3d\x20\x6e\x32\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x31\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x20\x3d\x20\x6e\x32\x2e\x65\x6c\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x28\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x61\x69\x6e\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x32\x2e\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x28\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x65\x72\x74\x28\x70\x6c\x61\x63\x65\x68\x6f\x6c\x64\x65\x72\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x65\x72\x74\x28\x6d\x61\x69\x6e\x41\x6e\x63\x68\x6f\x72\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x6e\x32\x2e\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x61\x72\x67\x65\x74\x28\x6e\x32\x2e\x70\x72\x6f\x70\x73\x2c\x20\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x32\x2e\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x28\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x65\x72\x74\x28\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x2c\x20\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x73\x53\x56\x47\x20\x3d\x20\x69\x73\x53\x56\x47\x20\x7c\x7c\x20\x69\x73\x54\x61\x72\x67\x65\x74\x53\x56\x47\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x75\x6e\x74\x20\x3d\x20\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x32\x2c\x20\x61\x6e\x63\x68\x6f\x72\x32\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x32\x2c\x20\x61\x6e\x63\x68\x6f\x72\x32\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x69\x73\x61\x62\x6c\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6d\x61\x69\x6e\x41\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x75\x6e\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x32\x2e\x65\x6c\x20\x3d\x20\x6e\x31\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x61\x69\x6e\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x32\x2e\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x31\x2e\x61\x6e\x63\x68\x6f\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x6e\x32\x2e\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x6e\x31\x2e\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x32\x2e\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x31\x2e\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x77\x61\x73\x44\x69\x73\x61\x62\x6c\x65\x64\x20\x3d\x20\x69\x73\x54\x65\x6c\x65\x70\x6f\x72\x74\x44\x69\x73\x61\x62\x6c\x65\x64\x28\x6e\x31\x2e\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x77\x61\x73\x44\x69\x73\x61\x62\x6c\x65\x64\x20\x3f\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3a\x20\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x77\x61\x73\x44\x69\x73\x61\x62\x6c\x65\x64\x20\x3f\x20\x6d\x61\x69\x6e\x41\x6e\x63\x68\x6f\x72\x20\x3a\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x73\x53\x56\x47\x20\x3d\x20\x69\x73\x53\x56\x47\x20\x7c\x7c\x20\x69\x73\x54\x61\x72\x67\x65\x74\x53\x56\x47\x28\x74\x61\x72\x67\x65\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x42\x6c\x6f\x63\x6b\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x31\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x63\x75\x72\x72\x65\x6e\x74\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x76\x65\x72\x73\x65\x53\x74\x61\x74\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x31\x2c\x20\x6e\x32\x2c\x20\x63\x75\x72\x72\x65\x6e\x74\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x63\x75\x72\x72\x65\x6e\x74\x41\x6e\x63\x68\x6f\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x64\x69\x73\x61\x62\x6c\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x77\x61\x73\x44\x69\x73\x61\x62\x6c\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x54\x65\x6c\x65\x70\x6f\x72\x74\x28\x6e\x32\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x6d\x61\x69\x6e\x41\x6e\x63\x68\x6f\x72\x2c\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x2c\x20\x31\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x28\x6e\x32\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x6e\x32\x2e\x70\x72\x6f\x70\x73\x2e\x74\x6f\x29\x20\x21\x3d\x3d\x20\x28\x6e\x31\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x6e\x31\x2e\x70\x72\x6f\x70\x73\x2e\x74\x6f\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x78\x74\x54\x61\x72\x67\x65\x74\x20\x3d\x20\x6e\x32\x2e\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x61\x72\x67\x65\x74\x28\x6e\x32\x2e\x70\x72\x6f\x70\x73\x2c\x20\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x54\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x54\x65\x6c\x65\x70\x6f\x72\x74\x28\x6e\x32\x2c\x20\x6e\x65\x78\x74\x54\x61\x72\x67\x65\x74\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x2c\x20\x30\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x77\x61\x73\x44\x69\x73\x61\x62\x6c\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x54\x65\x6c\x65\x70\x6f\x72\x74\x28\x6e\x32\x2c\x20\x74\x61\x72\x67\x65\x74\x2c\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x2c\x20\x69\x6e\x74\x65\x72\x6e\x61\x6c\x73\x2c\x20\x31\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x72\x65\x6d\x6f\x76\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x7b\x20\x75\x6d\x3a\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x2c\x20\x6f\x3a\x20\x7b\x20\x72\x65\x6d\x6f\x76\x65\x3a\x20\x68\x6f\x73\x74\x52\x65\x6d\x6f\x76\x65\x20\x7d\x20\x7d\x2c\x20\x64\x6f\x52\x65\x6d\x6f\x76\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x2c\x20\x74\x61\x72\x67\x65\x74\x2c\x20\x70\x72\x6f\x70\x73\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x52\x65\x6d\x6f\x76\x65\x28\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x64\x6f\x52\x65\x6d\x6f\x76\x65\x20\x7c\x7c\x20\x21\x69\x73\x54\x65\x6c\x65\x70\x6f\x72\x74\x44\x69\x73\x61\x62\x6c\x65\x64\x28\x70\x72\x6f\x70\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x6f\x73\x74\x52\x65\x6d\x6f\x76\x65\x28\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x69\x6c\x64\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x28\x63\x68\x69\x6c\x64\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x74\x72\x75\x65\x2c\x20\x21\x21\x63\x68\x69\x6c\x64\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x6d\x6f\x76\x65\x3a\x20\x6d\x6f\x76\x65\x54\x65\x6c\x65\x70\x6f\x72\x74\x2c\x0a\x20\x20\x68\x79\x64\x72\x61\x74\x65\x3a\x20\x68\x79\x64\x72\x61\x74\x65\x54\x65\x6c\x65\x70\x6f\x72\x74\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x6f\x76\x65\x54\x65\x6c\x65\x70\x6f\x72\x74\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x41\x6e\x63\x68\x6f\x72\x2c\x20\x7b\x20\x6f\x3a\x20\x7b\x20\x69\x6e\x73\x65\x72\x74\x20\x7d\x2c\x20\x6d\x3a\x20\x6d\x6f\x76\x65\x20\x7d\x2c\x20\x6d\x6f\x76\x65\x54\x79\x70\x65\x20\x3d\x20\x32\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x6d\x6f\x76\x65\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x65\x72\x74\x28\x76\x6e\x6f\x64\x65\x2e\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x41\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x65\x6c\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x72\x6f\x70\x73\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x52\x65\x6f\x72\x64\x65\x72\x20\x3d\x20\x6d\x6f\x76\x65\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x32\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x6f\x72\x64\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x65\x72\x74\x28\x65\x6c\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x41\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x52\x65\x6f\x72\x64\x65\x72\x20\x7c\x7c\x20\x69\x73\x54\x65\x6c\x65\x70\x6f\x72\x74\x44\x69\x73\x61\x62\x6c\x65\x64\x28\x70\x72\x6f\x70\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x41\x6e\x63\x68\x6f\x72\x2c\x20\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x52\x65\x6f\x72\x64\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x65\x72\x74\x28\x61\x6e\x63\x68\x6f\x72\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x70\x61\x72\x65\x6e\x74\x41\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x68\x79\x64\x72\x61\x74\x65\x54\x65\x6c\x65\x70\x6f\x72\x74\x28\x6e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x2c\x20\x7b\x20\x6f\x3a\x20\x7b\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x2c\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x2c\x20\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72\x20\x7d\x20\x7d\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x61\x72\x67\x65\x74\x28\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2c\x20\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x4e\x6f\x64\x65\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x2e\x5f\x6c\x70\x61\x20\x7c\x7c\x20\x74\x61\x72\x67\x65\x74\x2e\x66\x69\x72\x73\x74\x43\x68\x69\x6c\x64\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x54\x65\x6c\x65\x70\x6f\x72\x74\x44\x69\x73\x61\x62\x6c\x65\x64\x28\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x68\x79\x64\x72\x61\x74\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x6f\x64\x65\x29\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x28\x6e\x6f\x64\x65\x29\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x61\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x20\x26\x26\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x2e\x6e\x6f\x64\x65\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x38\x20\x26\x26\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x2e\x64\x61\x74\x61\x20\x3d\x3d\x3d\x20\x22\x74\x65\x6c\x65\x70\x6f\x72\x74\x20\x61\x6e\x63\x68\x6f\x72\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x20\x3d\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x2e\x5f\x6c\x70\x61\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x20\x26\x26\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x76\x6e\x6f\x64\x65\x2e\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x68\x79\x64\x72\x61\x74\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x74\x61\x72\x67\x65\x74\x4e\x6f\x64\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x74\x61\x72\x67\x65\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x20\x6f\x70\x74\x69\x6d\x69\x7a\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x2e\x61\x6e\x63\x68\x6f\x72\x20\x26\x26\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x28\x76\x6e\x6f\x64\x65\x2e\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x54\x65\x6c\x65\x70\x6f\x72\x74\x20\x3d\x20\x54\x65\x6c\x65\x70\x6f\x72\x74\x49\x6d\x70\x6c\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x20\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x28\x76\x6f\x69\x64\x20\x30\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x54\x65\x78\x74\x20\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x28\x76\x6f\x69\x64\x20\x30\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x20\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x28\x76\x6f\x69\x64\x20\x30\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x53\x74\x61\x74\x69\x63\x20\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x28\x76\x6f\x69\x64\x20\x30\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x62\x6c\x6f\x63\x6b\x53\x74\x61\x63\x6b\x20\x3d\x20\x5b\x5d\x3b\x0a\x6c\x65\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6f\x70\x65\x6e\x42\x6c\x6f\x63\x6b\x28\x64\x69\x73\x61\x62\x6c\x65\x54\x72\x61\x63\x6b\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x62\x6c\x6f\x63\x6b\x53\x74\x61\x63\x6b\x2e\x70\x75\x73\x68\x28\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x20\x3d\x20\x64\x69\x73\x61\x62\x6c\x65\x54\x72\x61\x63\x6b\x69\x6e\x67\x20\x3f\x20\x6e\x75\x6c\x6c\x20\x3a\x20\x5b\x5d\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x6c\x6f\x73\x65\x42\x6c\x6f\x63\x6b\x28\x29\x20\x7b\x0a\x20\x20\x62\x6c\x6f\x63\x6b\x53\x74\x61\x63\x6b\x2e\x70\x6f\x70\x28\x29\x3b\x0a\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x20\x3d\x20\x62\x6c\x6f\x63\x6b\x53\x74\x61\x63\x6b\x5b\x62\x6c\x6f\x63\x6b\x53\x74\x61\x63\x6b\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2d\x20\x31\x5d\x20\x7c\x7c\x20\x6e\x75\x6c\x6c\x3b\x0a\x7d\x0a\x6c\x65\x74\x20\x69\x73\x42\x6c\x6f\x63\x6b\x54\x72\x65\x65\x45\x6e\x61\x62\x6c\x65\x64\x20\x3d\x20\x31\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x42\x6c\x6f\x63\x6b\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x69\x73\x42\x6c\x6f\x63\x6b\x54\x72\x65\x65\x45\x6e\x61\x62\x6c\x65\x64\x20\x2b\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x75\x70\x42\x6c\x6f\x63\x6b\x28\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x76\x6e\x6f\x64\x65\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x69\x73\x42\x6c\x6f\x63\x6b\x54\x72\x65\x65\x45\x6e\x61\x62\x6c\x65\x64\x20\x3e\x20\x30\x20\x3f\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x20\x7c\x7c\x20\x45\x4d\x50\x54\x59\x5f\x41\x52\x52\x20\x3a\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x63\x6c\x6f\x73\x65\x42\x6c\x6f\x63\x6b\x28\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x42\x6c\x6f\x63\x6b\x54\x72\x65\x65\x45\x6e\x61\x62\x6c\x65\x64\x20\x3e\x20\x30\x20\x26\x26\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x2e\x70\x75\x73\x68\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x65\x74\x75\x70\x42\x6c\x6f\x63\x6b\x28\x63\x72\x65\x61\x74\x65\x42\x61\x73\x65\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x20\x74\x72\x75\x65\x29\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x42\x6c\x6f\x63\x6b\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x65\x74\x75\x70\x42\x6c\x6f\x63\x6b\x28\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x2c\x20\x74\x72\x75\x65\x29\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x56\x4e\x6f\x64\x65\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x20\x3f\x20\x76\x61\x6c\x75\x65\x2e\x5f\x5f\x76\x5f\x69\x73\x56\x4e\x6f\x64\x65\x20\x3d\x3d\x3d\x20\x74\x72\x75\x65\x20\x3a\x20\x66\x61\x6c\x73\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x53\x61\x6d\x65\x56\x4e\x6f\x64\x65\x54\x79\x70\x65\x28\x6e\x31\x2c\x20\x6e\x32\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x31\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x6e\x32\x2e\x74\x79\x70\x65\x20\x26\x26\x20\x6e\x31\x2e\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x6e\x32\x2e\x6b\x65\x79\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x56\x4e\x6f\x64\x65\x41\x72\x67\x73\x28\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x65\x72\x29\x20\x7b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x49\x6e\x74\x65\x72\x6e\x61\x6c\x4f\x62\x6a\x65\x63\x74\x4b\x65\x79\x20\x3d\x20\x60\x5f\x5f\x76\x49\x6e\x74\x65\x72\x6e\x61\x6c\x60\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x4b\x65\x79\x20\x3d\x20\x28\x7b\x20\x6b\x65\x79\x20\x7d\x29\x20\x3d\x3e\x20\x6b\x65\x79\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x6b\x65\x79\x20\x3a\x20\x6e\x75\x6c\x6c\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x52\x65\x66\x20\x3d\x20\x28\x7b\x20\x72\x65\x66\x3a\x20\x72\x65\x66\x32\x2c\x20\x72\x65\x66\x5f\x6b\x65\x79\x2c\x20\x72\x65\x66\x5f\x66\x6f\x72\x20\x7d\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x66\x32\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x72\x65\x66\x32\x29\x20\x7c\x7c\x20\x69\x73\x52\x65\x66\x28\x72\x65\x66\x32\x29\x20\x7c\x7c\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x72\x65\x66\x32\x29\x20\x3f\x20\x7b\x20\x69\x3a\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x72\x3a\x20\x72\x65\x66\x32\x2c\x20\x6b\x3a\x20\x72\x65\x66\x5f\x6b\x65\x79\x2c\x20\x66\x3a\x20\x21\x21\x72\x65\x66\x5f\x66\x6f\x72\x20\x7d\x20\x3a\x20\x72\x65\x66\x32\x20\x3a\x20\x6e\x75\x6c\x6c\x3b\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x42\x61\x73\x65\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3d\x20\x30\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x3d\x20\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x20\x3f\x20\x30\x20\x3a\x20\x31\x2c\x20\x69\x73\x42\x6c\x6f\x63\x6b\x4e\x6f\x64\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x2c\x20\x6e\x65\x65\x64\x46\x75\x6c\x6c\x43\x68\x69\x6c\x64\x72\x65\x6e\x4e\x6f\x72\x6d\x61\x6c\x69\x7a\x61\x74\x69\x6f\x6e\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x5f\x5f\x76\x5f\x69\x73\x56\x4e\x6f\x64\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x5f\x5f\x76\x5f\x73\x6b\x69\x70\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x74\x79\x70\x65\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x2c\x0a\x20\x20\x20\x20\x6b\x65\x79\x3a\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x4b\x65\x79\x28\x70\x72\x6f\x70\x73\x29\x2c\x0a\x20\x20\x20\x20\x72\x65\x66\x3a\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x52\x65\x66\x28\x70\x72\x6f\x70\x73\x29\x2c\x0a\x20\x20\x20\x20\x73\x63\x6f\x70\x65\x49\x64\x3a\x20\x63\x75\x72\x72\x65\x6e\x74\x53\x63\x6f\x70\x65\x49\x64\x2c\x0a\x20\x20\x20\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x0a\x20\x20\x20\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x73\x73\x46\x61\x6c\x6c\x62\x61\x63\x6b\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x64\x69\x72\x73\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x65\x6c\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x61\x6e\x63\x68\x6f\x72\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x73\x74\x61\x74\x69\x63\x43\x6f\x75\x6e\x74\x3a\x20\x30\x2c\x0a\x20\x20\x20\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x0a\x20\x20\x20\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x0a\x20\x20\x20\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x2c\x0a\x20\x20\x20\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x3a\x20\x6e\x75\x6c\x6c\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x69\x66\x20\x28\x6e\x65\x65\x64\x46\x75\x6c\x6c\x43\x68\x69\x6c\x64\x72\x65\x6e\x4e\x6f\x72\x6d\x61\x6c\x69\x7a\x61\x74\x69\x6f\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x2e\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x7c\x3d\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x3f\x20\x38\x20\x3a\x20\x31\x36\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x42\x6c\x6f\x63\x6b\x54\x72\x65\x65\x45\x6e\x61\x62\x6c\x65\x64\x20\x3e\x20\x30\x20\x26\x26\x20\x21\x69\x73\x42\x6c\x6f\x63\x6b\x4e\x6f\x64\x65\x20\x26\x26\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x20\x26\x26\x20\x28\x76\x6e\x6f\x64\x65\x2e\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3e\x20\x30\x20\x7c\x7c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x29\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x21\x3d\x3d\x20\x33\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x2e\x70\x75\x73\x68\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x20\x3d\x20\x5f\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x5f\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3d\x20\x30\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x2c\x20\x69\x73\x42\x6c\x6f\x63\x6b\x4e\x6f\x64\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x74\x79\x70\x65\x20\x7c\x7c\x20\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x4e\x55\x4c\x4c\x5f\x44\x59\x4e\x41\x4d\x49\x43\x5f\x43\x4f\x4d\x50\x4f\x4e\x45\x4e\x54\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x79\x70\x65\x20\x3d\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6c\x6f\x6e\x65\x64\x20\x3d\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x63\x6c\x6f\x6e\x65\x64\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x42\x6c\x6f\x63\x6b\x54\x72\x65\x65\x45\x6e\x61\x62\x6c\x65\x64\x20\x3e\x20\x30\x20\x26\x26\x20\x21\x69\x73\x42\x6c\x6f\x63\x6b\x4e\x6f\x64\x65\x20\x26\x26\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6c\x6f\x6e\x65\x64\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x5b\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x74\x79\x70\x65\x29\x5d\x20\x3d\x20\x63\x6c\x6f\x6e\x65\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x2e\x70\x75\x73\x68\x28\x63\x6c\x6f\x6e\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6c\x6f\x6e\x65\x64\x2e\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x7c\x3d\x20\x2d\x32\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6c\x6f\x6e\x65\x64\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x43\x6c\x61\x73\x73\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x74\x79\x70\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x79\x70\x65\x20\x3d\x20\x74\x79\x70\x65\x2e\x5f\x5f\x76\x63\x63\x4f\x70\x74\x73\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x20\x3d\x20\x67\x75\x61\x72\x64\x52\x65\x61\x63\x74\x69\x76\x65\x50\x72\x6f\x70\x73\x28\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x7b\x20\x63\x6c\x61\x73\x73\x3a\x20\x6b\x6c\x61\x73\x73\x2c\x20\x73\x74\x79\x6c\x65\x20\x7d\x20\x3d\x20\x70\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x6c\x61\x73\x73\x20\x26\x26\x20\x21\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x6b\x6c\x61\x73\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x2e\x63\x6c\x61\x73\x73\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x6c\x61\x73\x73\x28\x6b\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x73\x74\x79\x6c\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x50\x72\x6f\x78\x79\x28\x73\x74\x79\x6c\x65\x29\x20\x26\x26\x20\x21\x69\x73\x41\x72\x72\x61\x79\x28\x73\x74\x79\x6c\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x20\x3d\x20\x65\x78\x74\x65\x6e\x64\x28\x7b\x7d\x2c\x20\x73\x74\x79\x6c\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x2e\x73\x74\x79\x6c\x65\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x74\x79\x6c\x65\x28\x73\x74\x79\x6c\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x3d\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x74\x79\x70\x65\x29\x20\x3f\x20\x31\x20\x3a\x20\x69\x73\x53\x75\x73\x70\x65\x6e\x73\x65\x28\x74\x79\x70\x65\x29\x20\x3f\x20\x31\x32\x38\x20\x3a\x20\x69\x73\x54\x65\x6c\x65\x70\x6f\x72\x74\x28\x74\x79\x70\x65\x29\x20\x3f\x20\x36\x34\x20\x3a\x20\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x74\x79\x70\x65\x29\x20\x3f\x20\x34\x20\x3a\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x79\x70\x65\x29\x20\x3f\x20\x32\x20\x3a\x20\x30\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x42\x61\x73\x65\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x2c\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x20\x69\x73\x42\x6c\x6f\x63\x6b\x4e\x6f\x64\x65\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x75\x61\x72\x64\x52\x65\x61\x63\x74\x69\x76\x65\x50\x72\x6f\x70\x73\x28\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x70\x72\x6f\x70\x73\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x50\x72\x6f\x78\x79\x28\x70\x72\x6f\x70\x73\x29\x20\x7c\x7c\x20\x49\x6e\x74\x65\x72\x6e\x61\x6c\x4f\x62\x6a\x65\x63\x74\x4b\x65\x79\x20\x69\x6e\x20\x70\x72\x6f\x70\x73\x20\x3f\x20\x65\x78\x74\x65\x6e\x64\x28\x7b\x7d\x2c\x20\x70\x72\x6f\x70\x73\x29\x20\x3a\x20\x70\x72\x6f\x70\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x65\x78\x74\x72\x61\x50\x72\x6f\x70\x73\x2c\x20\x6d\x65\x72\x67\x65\x52\x65\x66\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x70\x72\x6f\x70\x73\x2c\x20\x72\x65\x66\x3a\x20\x72\x65\x66\x32\x2c\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x65\x72\x67\x65\x64\x50\x72\x6f\x70\x73\x20\x3d\x20\x65\x78\x74\x72\x61\x50\x72\x6f\x70\x73\x20\x3f\x20\x6d\x65\x72\x67\x65\x50\x72\x6f\x70\x73\x28\x70\x72\x6f\x70\x73\x20\x7c\x7c\x20\x7b\x7d\x2c\x20\x65\x78\x74\x72\x61\x50\x72\x6f\x70\x73\x29\x20\x3a\x20\x70\x72\x6f\x70\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6c\x6f\x6e\x65\x64\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x5f\x5f\x76\x5f\x69\x73\x56\x4e\x6f\x64\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x5f\x5f\x76\x5f\x73\x6b\x69\x70\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x74\x79\x70\x65\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x3a\x20\x6d\x65\x72\x67\x65\x64\x50\x72\x6f\x70\x73\x2c\x0a\x20\x20\x20\x20\x6b\x65\x79\x3a\x20\x6d\x65\x72\x67\x65\x64\x50\x72\x6f\x70\x73\x20\x26\x26\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x4b\x65\x79\x28\x6d\x65\x72\x67\x65\x64\x50\x72\x6f\x70\x73\x29\x2c\x0a\x20\x20\x20\x20\x72\x65\x66\x3a\x20\x65\x78\x74\x72\x61\x50\x72\x6f\x70\x73\x20\x26\x26\x20\x65\x78\x74\x72\x61\x50\x72\x6f\x70\x73\x2e\x72\x65\x66\x20\x3f\x20\x6d\x65\x72\x67\x65\x52\x65\x66\x20\x26\x26\x20\x72\x65\x66\x32\x20\x3f\x20\x69\x73\x41\x72\x72\x61\x79\x28\x72\x65\x66\x32\x29\x20\x3f\x20\x72\x65\x66\x32\x2e\x63\x6f\x6e\x63\x61\x74\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x52\x65\x66\x28\x65\x78\x74\x72\x61\x50\x72\x6f\x70\x73\x29\x29\x20\x3a\x20\x5b\x72\x65\x66\x32\x2c\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x52\x65\x66\x28\x65\x78\x74\x72\x61\x50\x72\x6f\x70\x73\x29\x5d\x20\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x52\x65\x66\x28\x65\x78\x74\x72\x61\x50\x72\x6f\x70\x73\x29\x20\x3a\x20\x72\x65\x66\x32\x2c\x0a\x20\x20\x20\x20\x73\x63\x6f\x70\x65\x49\x64\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x73\x63\x6f\x70\x65\x49\x64\x2c\x0a\x20\x20\x20\x20\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x73\x6c\x6f\x74\x53\x63\x6f\x70\x65\x49\x64\x73\x2c\x0a\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x0a\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x74\x61\x72\x67\x65\x74\x2c\x0a\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x74\x61\x72\x67\x65\x74\x41\x6e\x63\x68\x6f\x72\x2c\x0a\x20\x20\x20\x20\x73\x74\x61\x74\x69\x63\x43\x6f\x75\x6e\x74\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x73\x74\x61\x74\x69\x63\x43\x6f\x75\x6e\x74\x2c\x0a\x20\x20\x20\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x2c\x0a\x20\x20\x20\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x3a\x20\x65\x78\x74\x72\x61\x50\x72\x6f\x70\x73\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x20\x3f\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x3d\x3d\x3d\x20\x2d\x31\x20\x3f\x20\x31\x36\x20\x3a\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x7c\x20\x31\x36\x20\x3a\x20\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x2c\x0a\x20\x20\x20\x20\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x64\x79\x6e\x61\x6d\x69\x63\x50\x72\x6f\x70\x73\x2c\x0a\x20\x20\x20\x20\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x64\x79\x6e\x61\x6d\x69\x63\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x0a\x20\x20\x20\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2c\x0a\x20\x20\x20\x20\x64\x69\x72\x73\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x64\x69\x72\x73\x2c\x0a\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2c\x0a\x20\x20\x20\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x0a\x20\x20\x20\x20\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x20\x26\x26\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x2e\x73\x73\x43\x6f\x6e\x74\x65\x6e\x74\x29\x2c\x0a\x20\x20\x20\x20\x73\x73\x46\x61\x6c\x6c\x62\x61\x63\x6b\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x73\x73\x46\x61\x6c\x6c\x62\x61\x63\x6b\x20\x26\x26\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x2e\x73\x73\x46\x61\x6c\x6c\x62\x61\x63\x6b\x29\x2c\x0a\x20\x20\x20\x20\x65\x6c\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x2c\x0a\x20\x20\x20\x20\x61\x6e\x63\x68\x6f\x72\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x61\x6e\x63\x68\x6f\x72\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6c\x6f\x6e\x65\x64\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x56\x4e\x6f\x64\x65\x28\x74\x65\x78\x74\x20\x3d\x20\x22\x20\x22\x2c\x20\x66\x6c\x61\x67\x20\x3d\x20\x30\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x54\x65\x78\x74\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x74\x65\x78\x74\x2c\x20\x66\x6c\x61\x67\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x69\x63\x56\x4e\x6f\x64\x65\x28\x63\x6f\x6e\x74\x65\x6e\x74\x2c\x20\x6e\x75\x6d\x62\x65\x72\x4f\x66\x4e\x6f\x64\x65\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x53\x74\x61\x74\x69\x63\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x63\x6f\x6e\x74\x65\x6e\x74\x29\x3b\x0a\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x74\x61\x74\x69\x63\x43\x6f\x75\x6e\x74\x20\x3d\x20\x6e\x75\x6d\x62\x65\x72\x4f\x66\x4e\x6f\x64\x65\x73\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x6d\x65\x6e\x74\x56\x4e\x6f\x64\x65\x28\x74\x65\x78\x74\x20\x3d\x20\x22\x22\x2c\x20\x61\x73\x42\x6c\x6f\x63\x6b\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x73\x42\x6c\x6f\x63\x6b\x20\x3f\x20\x28\x6f\x70\x65\x6e\x42\x6c\x6f\x63\x6b\x28\x29\x2c\x20\x63\x72\x65\x61\x74\x65\x42\x6c\x6f\x63\x6b\x28\x43\x6f\x6d\x6d\x65\x6e\x74\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x74\x65\x78\x74\x29\x29\x20\x3a\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x43\x6f\x6d\x6d\x65\x6e\x74\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x74\x65\x78\x74\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x28\x63\x68\x69\x6c\x64\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x7c\x7c\x20\x74\x79\x70\x65\x6f\x66\x20\x63\x68\x69\x6c\x64\x20\x3d\x3d\x3d\x20\x22\x62\x6f\x6f\x6c\x65\x61\x6e\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x43\x6f\x6d\x6d\x65\x6e\x74\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x63\x68\x69\x6c\x64\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x46\x72\x61\x67\x6d\x65\x6e\x74\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x63\x68\x69\x6c\x64\x2e\x73\x6c\x69\x63\x65\x28\x29\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x63\x68\x69\x6c\x64\x20\x3d\x3d\x3d\x20\x22\x6f\x62\x6a\x65\x63\x74\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6c\x6f\x6e\x65\x49\x66\x4d\x6f\x75\x6e\x74\x65\x64\x28\x63\x68\x69\x6c\x64\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x54\x65\x78\x74\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x53\x74\x72\x69\x6e\x67\x28\x63\x68\x69\x6c\x64\x29\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x6c\x6f\x6e\x65\x49\x66\x4d\x6f\x75\x6e\x74\x65\x64\x28\x63\x68\x69\x6c\x64\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x68\x69\x6c\x64\x2e\x65\x6c\x20\x3d\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x7c\x7c\x20\x63\x68\x69\x6c\x64\x2e\x6d\x65\x6d\x6f\x20\x3f\x20\x63\x68\x69\x6c\x64\x20\x3a\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x28\x63\x68\x69\x6c\x64\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x76\x6e\x6f\x64\x65\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x74\x79\x70\x65\x20\x3d\x20\x30\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x79\x70\x65\x20\x3d\x20\x31\x36\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x3d\x3d\x20\x22\x6f\x62\x6a\x65\x63\x74\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x28\x31\x20\x7c\x20\x36\x34\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x6c\x6f\x74\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x64\x65\x66\x61\x75\x6c\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x6c\x6f\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x6c\x6f\x74\x2e\x5f\x63\x20\x26\x26\x20\x28\x73\x6c\x6f\x74\x2e\x5f\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x76\x6e\x6f\x64\x65\x2c\x20\x73\x6c\x6f\x74\x28\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x6c\x6f\x74\x2e\x5f\x63\x20\x26\x26\x20\x28\x73\x6c\x6f\x74\x2e\x5f\x64\x20\x3d\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x20\x3d\x20\x33\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x6c\x6f\x74\x46\x6c\x61\x67\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x5f\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x73\x6c\x6f\x74\x46\x6c\x61\x67\x20\x26\x26\x20\x21\x28\x49\x6e\x74\x65\x72\x6e\x61\x6c\x4f\x62\x6a\x65\x63\x74\x4b\x65\x79\x20\x69\x6e\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x5f\x63\x74\x78\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x73\x6c\x6f\x74\x46\x6c\x61\x67\x20\x3d\x3d\x3d\x20\x33\x20\x26\x26\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x6c\x6f\x74\x73\x2e\x5f\x20\x3d\x3d\x3d\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x5f\x20\x3d\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x5f\x20\x3d\x20\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x70\x61\x74\x63\x68\x46\x6c\x61\x67\x20\x7c\x3d\x20\x31\x30\x32\x34\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x7b\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x5f\x63\x74\x78\x3a\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x7d\x3b\x0a\x20\x20\x20\x20\x74\x79\x70\x65\x20\x3d\x20\x33\x32\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x53\x74\x72\x69\x6e\x67\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x36\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x20\x3d\x20\x31\x36\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x5b\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x56\x4e\x6f\x64\x65\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x20\x3d\x20\x38\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x7c\x3d\x20\x74\x79\x70\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x65\x72\x67\x65\x50\x72\x6f\x70\x73\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x74\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x61\x72\x67\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x6f\x4d\x65\x72\x67\x65\x20\x3d\x20\x61\x72\x67\x73\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x74\x6f\x4d\x65\x72\x67\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x63\x6c\x61\x73\x73\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x72\x65\x74\x2e\x63\x6c\x61\x73\x73\x20\x21\x3d\x3d\x20\x74\x6f\x4d\x65\x72\x67\x65\x2e\x63\x6c\x61\x73\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x2e\x63\x6c\x61\x73\x73\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x6c\x61\x73\x73\x28\x5b\x72\x65\x74\x2e\x63\x6c\x61\x73\x73\x2c\x20\x74\x6f\x4d\x65\x72\x67\x65\x2e\x63\x6c\x61\x73\x73\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x73\x74\x79\x6c\x65\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x2e\x73\x74\x79\x6c\x65\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x74\x79\x6c\x65\x28\x5b\x72\x65\x74\x2e\x73\x74\x79\x6c\x65\x2c\x20\x74\x6f\x4d\x65\x72\x67\x65\x2e\x73\x74\x79\x6c\x65\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x4f\x6e\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x20\x3d\x20\x72\x65\x74\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x63\x6f\x6d\x69\x6e\x67\x20\x3d\x20\x74\x6f\x4d\x65\x72\x67\x65\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x63\x6f\x6d\x69\x6e\x67\x20\x26\x26\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x20\x21\x3d\x3d\x20\x69\x6e\x63\x6f\x6d\x69\x6e\x67\x20\x26\x26\x20\x21\x28\x69\x73\x41\x72\x72\x61\x79\x28\x65\x78\x69\x73\x74\x69\x6e\x67\x29\x20\x26\x26\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x69\x6e\x63\x6f\x6d\x69\x6e\x67\x29\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x20\x3f\x20\x5b\x5d\x2e\x63\x6f\x6e\x63\x61\x74\x28\x65\x78\x69\x73\x74\x69\x6e\x67\x2c\x20\x69\x6e\x63\x6f\x6d\x69\x6e\x67\x29\x20\x3a\x20\x69\x6e\x63\x6f\x6d\x69\x6e\x67\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x21\x3d\x3d\x20\x22\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x74\x6f\x4d\x65\x72\x67\x65\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x76\x6f\x6b\x65\x56\x4e\x6f\x64\x65\x48\x6f\x6f\x6b\x28\x68\x6f\x6f\x6b\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x68\x6f\x6f\x6b\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x37\x2c\x20\x5b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2c\x0a\x20\x20\x20\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x0a\x20\x20\x5d\x29\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x65\x6d\x70\x74\x79\x41\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x41\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x28\x29\x3b\x0a\x6c\x65\x74\x20\x75\x69\x64\x24\x31\x20\x3d\x20\x30\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x2c\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x79\x70\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x20\x3d\x20\x28\x70\x61\x72\x65\x6e\x74\x20\x3f\x20\x70\x61\x72\x65\x6e\x74\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x20\x3a\x20\x76\x6e\x6f\x64\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x29\x20\x7c\x7c\x20\x65\x6d\x70\x74\x79\x41\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x7b\x0a\x20\x20\x20\x20\x75\x69\x64\x3a\x20\x75\x69\x64\x24\x31\x2b\x2b\x2c\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2c\x0a\x20\x20\x20\x20\x74\x79\x70\x65\x2c\x0a\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x2c\x0a\x20\x20\x20\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2c\x0a\x20\x20\x20\x20\x72\x6f\x6f\x74\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x6e\x65\x78\x74\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x73\x75\x62\x54\x72\x65\x65\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x65\x66\x66\x65\x63\x74\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x75\x70\x64\x61\x74\x65\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x73\x63\x6f\x70\x65\x3a\x20\x6e\x65\x77\x20\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x28\x74\x72\x75\x65\x29\x2c\x0a\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x78\x79\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x65\x78\x70\x6f\x73\x65\x64\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x65\x78\x70\x6f\x73\x65\x50\x72\x6f\x78\x79\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x77\x69\x74\x68\x50\x72\x6f\x78\x79\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x76\x69\x64\x65\x73\x3a\x20\x70\x61\x72\x65\x6e\x74\x20\x3f\x20\x70\x61\x72\x65\x6e\x74\x2e\x70\x72\x6f\x76\x69\x64\x65\x73\x20\x3a\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x70\x72\x6f\x76\x69\x64\x65\x73\x29\x2c\x0a\x20\x20\x20\x20\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x43\x61\x63\x68\x65\x3a\x20\x5b\x5d\x2c\x0a\x20\x20\x20\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x64\x69\x72\x65\x63\x74\x69\x76\x65\x73\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x50\x72\x6f\x70\x73\x4f\x70\x74\x69\x6f\x6e\x73\x28\x74\x79\x70\x65\x2c\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x29\x2c\x0a\x20\x20\x20\x20\x65\x6d\x69\x74\x73\x4f\x70\x74\x69\x6f\x6e\x73\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x45\x6d\x69\x74\x73\x4f\x70\x74\x69\x6f\x6e\x73\x28\x74\x79\x70\x65\x2c\x20\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x29\x2c\x0a\x20\x20\x20\x20\x65\x6d\x69\x74\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x65\x6d\x69\x74\x74\x65\x64\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x44\x65\x66\x61\x75\x6c\x74\x73\x3a\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x2c\x0a\x20\x20\x20\x20\x69\x6e\x68\x65\x72\x69\x74\x41\x74\x74\x72\x73\x3a\x20\x74\x79\x70\x65\x2e\x69\x6e\x68\x65\x72\x69\x74\x41\x74\x74\x72\x73\x2c\x0a\x20\x20\x20\x20\x63\x74\x78\x3a\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x2c\x0a\x20\x20\x20\x20\x64\x61\x74\x61\x3a\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x3a\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x2c\x0a\x20\x20\x20\x20\x61\x74\x74\x72\x73\x3a\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x2c\x0a\x20\x20\x20\x20\x73\x6c\x6f\x74\x73\x3a\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x2c\x0a\x20\x20\x20\x20\x72\x65\x66\x73\x3a\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x2c\x0a\x20\x20\x20\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x3a\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x2c\x0a\x20\x20\x20\x20\x73\x65\x74\x75\x70\x43\x6f\x6e\x74\x65\x78\x74\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2c\x0a\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x49\x64\x3a\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x3f\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x49\x64\x20\x3a\x20\x30\x2c\x0a\x20\x20\x20\x20\x61\x73\x79\x6e\x63\x44\x65\x70\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x61\x73\x79\x6e\x63\x52\x65\x73\x6f\x6c\x76\x65\x64\x3a\x20\x66\x61\x6c\x73\x65\x2c\x0a\x20\x20\x20\x20\x69\x73\x4d\x6f\x75\x6e\x74\x65\x64\x3a\x20\x66\x61\x6c\x73\x65\x2c\x0a\x20\x20\x20\x20\x69\x73\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x3a\x20\x66\x61\x6c\x73\x65\x2c\x0a\x20\x20\x20\x20\x69\x73\x44\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x3a\x20\x66\x61\x6c\x73\x65\x2c\x0a\x20\x20\x20\x20\x62\x63\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x63\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x62\x6d\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x6d\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x62\x75\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x75\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x75\x6d\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x62\x75\x6d\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x64\x61\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x61\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x72\x74\x67\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x72\x74\x63\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x65\x63\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x20\x20\x73\x70\x3a\x20\x6e\x75\x6c\x6c\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x63\x74\x78\x20\x3d\x20\x7b\x20\x5f\x3a\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x7d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x72\x6f\x6f\x74\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x20\x3f\x20\x70\x61\x72\x65\x6e\x74\x2e\x72\x6f\x6f\x74\x20\x3a\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x6d\x69\x74\x20\x3d\x20\x65\x6d\x69\x74\x24\x31\x2e\x62\x69\x6e\x64\x28\x6e\x75\x6c\x6c\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x63\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x7d\x0a\x6c\x65\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x7c\x7c\x20\x63\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x63\x6f\x70\x65\x2e\x6f\x6e\x28\x29\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x75\x6e\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x26\x26\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x63\x6f\x70\x65\x2e\x6f\x66\x66\x28\x29\x3b\x0a\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x53\x74\x61\x74\x65\x66\x75\x6c\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x34\x3b\x0a\x7d\x0a\x6c\x65\x74\x20\x69\x73\x49\x6e\x53\x53\x52\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x53\x65\x74\x75\x70\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x75\x70\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x69\x73\x53\x53\x52\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x69\x73\x49\x6e\x53\x53\x52\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x53\x65\x74\x75\x70\x20\x3d\x20\x69\x73\x53\x53\x52\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x70\x72\x6f\x70\x73\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x53\x74\x61\x74\x65\x66\x75\x6c\x20\x3d\x20\x69\x73\x53\x74\x61\x74\x65\x66\x75\x6c\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x69\x6e\x69\x74\x50\x72\x6f\x70\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x70\x72\x6f\x70\x73\x2c\x20\x69\x73\x53\x74\x61\x74\x65\x66\x75\x6c\x2c\x20\x69\x73\x53\x53\x52\x29\x3b\x0a\x20\x20\x69\x6e\x69\x74\x53\x6c\x6f\x74\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x20\x3d\x20\x69\x73\x53\x74\x61\x74\x65\x66\x75\x6c\x20\x3f\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x66\x75\x6c\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x69\x73\x53\x53\x52\x29\x20\x3a\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x69\x73\x49\x6e\x53\x53\x52\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x53\x65\x74\x75\x70\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x66\x75\x6c\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x69\x73\x53\x53\x52\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x74\x79\x70\x65\x3b\x0a\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x63\x63\x65\x73\x73\x43\x61\x63\x68\x65\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x78\x79\x20\x3d\x20\x6d\x61\x72\x6b\x52\x61\x77\x28\x6e\x65\x77\x20\x50\x72\x6f\x78\x79\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x63\x74\x78\x2c\x20\x50\x75\x62\x6c\x69\x63\x49\x6e\x73\x74\x61\x6e\x63\x65\x50\x72\x6f\x78\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x29\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x73\x65\x74\x75\x70\x20\x7d\x20\x3d\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x69\x66\x20\x28\x73\x65\x74\x75\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x74\x75\x70\x43\x6f\x6e\x74\x65\x78\x74\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x65\x74\x75\x70\x43\x6f\x6e\x74\x65\x78\x74\x20\x3d\x20\x73\x65\x74\x75\x70\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x31\x20\x3f\x20\x63\x72\x65\x61\x74\x65\x53\x65\x74\x75\x70\x43\x6f\x6e\x74\x65\x78\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x3a\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x70\x61\x75\x73\x65\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x20\x3d\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x73\x65\x74\x75\x70\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x30\x2c\x20\x5b\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x70\x73\x2c\x20\x73\x65\x74\x75\x70\x43\x6f\x6e\x74\x65\x78\x74\x5d\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x73\x65\x74\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x75\x6e\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x50\x72\x6f\x6d\x69\x73\x65\x28\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x2e\x74\x68\x65\x6e\x28\x75\x6e\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x75\x6e\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x53\x53\x52\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x2e\x74\x68\x65\x6e\x28\x28\x72\x65\x73\x6f\x6c\x76\x65\x64\x52\x65\x73\x75\x6c\x74\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x6e\x64\x6c\x65\x53\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x72\x65\x73\x6f\x6c\x76\x65\x64\x52\x65\x73\x75\x6c\x74\x2c\x20\x69\x73\x53\x53\x52\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x2e\x63\x61\x74\x63\x68\x28\x28\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x61\x6e\x64\x6c\x65\x45\x72\x72\x6f\x72\x28\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x30\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x73\x79\x6e\x63\x44\x65\x70\x20\x3d\x20\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x61\x6e\x64\x6c\x65\x53\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x2c\x20\x69\x73\x53\x53\x52\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x66\x69\x6e\x69\x73\x68\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x53\x65\x74\x75\x70\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x69\x73\x53\x53\x52\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x68\x61\x6e\x64\x6c\x65\x53\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x2c\x20\x69\x73\x53\x53\x52\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x74\x79\x70\x65\x2e\x5f\x5f\x73\x73\x72\x49\x6e\x6c\x69\x6e\x65\x52\x65\x6e\x64\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x73\x72\x52\x65\x6e\x64\x65\x72\x20\x3d\x20\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x72\x65\x6e\x64\x65\x72\x20\x3d\x20\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x65\x74\x75\x70\x53\x74\x61\x74\x65\x20\x3d\x20\x70\x72\x6f\x78\x79\x52\x65\x66\x73\x28\x73\x65\x74\x75\x70\x52\x65\x73\x75\x6c\x74\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x3b\x0a\x20\x20\x66\x69\x6e\x69\x73\x68\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x53\x65\x74\x75\x70\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x69\x73\x53\x53\x52\x29\x3b\x0a\x7d\x0a\x6c\x65\x74\x20\x63\x6f\x6d\x70\x69\x6c\x65\x24\x31\x3b\x0a\x6c\x65\x74\x20\x69\x6e\x73\x74\x61\x6c\x6c\x57\x69\x74\x68\x50\x72\x6f\x78\x79\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x67\x69\x73\x74\x65\x72\x52\x75\x6e\x74\x69\x6d\x65\x43\x6f\x6d\x70\x69\x6c\x65\x72\x28\x5f\x63\x6f\x6d\x70\x69\x6c\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6d\x70\x69\x6c\x65\x24\x31\x20\x3d\x20\x5f\x63\x6f\x6d\x70\x69\x6c\x65\x3b\x0a\x20\x20\x69\x6e\x73\x74\x61\x6c\x6c\x57\x69\x74\x68\x50\x72\x6f\x78\x79\x20\x3d\x20\x28\x69\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x2e\x72\x65\x6e\x64\x65\x72\x2e\x5f\x72\x63\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x2e\x77\x69\x74\x68\x50\x72\x6f\x78\x79\x20\x3d\x20\x6e\x65\x77\x20\x50\x72\x6f\x78\x79\x28\x69\x2e\x63\x74\x78\x2c\x20\x52\x75\x6e\x74\x69\x6d\x65\x43\x6f\x6d\x70\x69\x6c\x65\x64\x50\x75\x62\x6c\x69\x63\x49\x6e\x73\x74\x61\x6e\x63\x65\x50\x72\x6f\x78\x79\x48\x61\x6e\x64\x6c\x65\x72\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x69\x73\x52\x75\x6e\x74\x69\x6d\x65\x4f\x6e\x6c\x79\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x21\x63\x6f\x6d\x70\x69\x6c\x65\x24\x31\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x69\x6e\x69\x73\x68\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x53\x65\x74\x75\x70\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x69\x73\x53\x53\x52\x2c\x20\x73\x6b\x69\x70\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x74\x79\x70\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x72\x65\x6e\x64\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x53\x53\x52\x20\x26\x26\x20\x63\x6f\x6d\x70\x69\x6c\x65\x24\x31\x20\x26\x26\x20\x21\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x72\x65\x6e\x64\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x20\x3d\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x74\x65\x6d\x70\x6c\x61\x74\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x65\x6d\x70\x6c\x61\x74\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x69\x73\x43\x75\x73\x74\x6f\x6d\x45\x6c\x65\x6d\x65\x6e\x74\x2c\x20\x63\x6f\x6d\x70\x69\x6c\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x20\x7d\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x63\x6f\x6e\x66\x69\x67\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x64\x65\x6c\x69\x6d\x69\x74\x65\x72\x73\x2c\x20\x63\x6f\x6d\x70\x69\x6c\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x3a\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x43\x6f\x6d\x70\x69\x6c\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x20\x7d\x20\x3d\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x69\x6e\x61\x6c\x43\x6f\x6d\x70\x69\x6c\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x20\x3d\x20\x65\x78\x74\x65\x6e\x64\x28\x65\x78\x74\x65\x6e\x64\x28\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x73\x43\x75\x73\x74\x6f\x6d\x45\x6c\x65\x6d\x65\x6e\x74\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x6c\x69\x6d\x69\x74\x65\x72\x73\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x63\x6f\x6d\x70\x69\x6c\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x29\x2c\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x43\x6f\x6d\x70\x69\x6c\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x72\x65\x6e\x64\x65\x72\x20\x3d\x20\x63\x6f\x6d\x70\x69\x6c\x65\x24\x31\x28\x74\x65\x6d\x70\x6c\x61\x74\x65\x2c\x20\x66\x69\x6e\x61\x6c\x43\x6f\x6d\x70\x69\x6c\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x72\x65\x6e\x64\x65\x72\x20\x3d\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x72\x65\x6e\x64\x65\x72\x20\x7c\x7c\x20\x4e\x4f\x4f\x50\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6c\x6c\x57\x69\x74\x68\x50\x72\x6f\x78\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6c\x6c\x57\x69\x74\x68\x50\x72\x6f\x78\x79\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x7b\x0a\x20\x20\x20\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x70\x61\x75\x73\x65\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x61\x70\x70\x6c\x79\x4f\x70\x74\x69\x6f\x6e\x73\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x73\x65\x74\x54\x72\x61\x63\x6b\x69\x6e\x67\x28\x29\x3b\x0a\x20\x20\x20\x20\x75\x6e\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x41\x74\x74\x72\x73\x50\x72\x6f\x78\x79\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x65\x77\x20\x50\x72\x6f\x78\x79\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x74\x74\x72\x73\x2c\x20\x7b\x0a\x20\x20\x20\x20\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x63\x6b\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x22\x67\x65\x74\x22\x2c\x20\x22\x24\x61\x74\x74\x72\x73\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x53\x65\x74\x75\x70\x43\x6f\x6e\x74\x65\x78\x74\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x78\x70\x6f\x73\x65\x20\x3d\x20\x28\x65\x78\x70\x6f\x73\x65\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x78\x70\x6f\x73\x65\x64\x20\x3d\x20\x65\x78\x70\x6f\x73\x65\x64\x20\x7c\x7c\x20\x7b\x7d\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x6c\x65\x74\x20\x61\x74\x74\x72\x73\x3b\x0a\x20\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x67\x65\x74\x20\x61\x74\x74\x72\x73\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x74\x74\x72\x73\x20\x7c\x7c\x20\x28\x61\x74\x74\x72\x73\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x41\x74\x74\x72\x73\x50\x72\x6f\x78\x79\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x73\x6c\x6f\x74\x73\x3a\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x6c\x6f\x74\x73\x2c\x0a\x20\x20\x20\x20\x20\x20\x65\x6d\x69\x74\x3a\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x6d\x69\x74\x2c\x0a\x20\x20\x20\x20\x20\x20\x65\x78\x70\x6f\x73\x65\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x45\x78\x70\x6f\x73\x65\x50\x72\x6f\x78\x79\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x78\x70\x6f\x73\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x78\x70\x6f\x73\x65\x50\x72\x6f\x78\x79\x20\x7c\x7c\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x78\x70\x6f\x73\x65\x50\x72\x6f\x78\x79\x20\x3d\x20\x6e\x65\x77\x20\x50\x72\x6f\x78\x79\x28\x70\x72\x6f\x78\x79\x52\x65\x66\x73\x28\x6d\x61\x72\x6b\x52\x61\x77\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x78\x70\x6f\x73\x65\x64\x29\x29\x2c\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x67\x65\x74\x28\x74\x61\x72\x67\x65\x74\x2c\x20\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x69\x6e\x20\x74\x61\x72\x67\x65\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x61\x72\x67\x65\x74\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x69\x6e\x20\x70\x75\x62\x6c\x69\x63\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x4d\x61\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x75\x62\x6c\x69\x63\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x4d\x61\x70\x5b\x6b\x65\x79\x5d\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x29\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x63\x6c\x61\x73\x73\x69\x66\x79\x52\x45\x20\x3d\x20\x2f\x28\x3f\x3a\x5e\x7c\x5b\x2d\x5f\x5d\x29\x28\x5c\x77\x29\x2f\x67\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x63\x6c\x61\x73\x73\x69\x66\x79\x20\x3d\x20\x28\x73\x74\x72\x29\x20\x3d\x3e\x20\x73\x74\x72\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x63\x6c\x61\x73\x73\x69\x66\x79\x52\x45\x2c\x20\x28\x63\x29\x20\x3d\x3e\x20\x63\x2e\x74\x6f\x55\x70\x70\x65\x72\x43\x61\x73\x65\x28\x29\x29\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x2f\x5b\x2d\x5f\x5d\x2f\x67\x2c\x20\x22\x22\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4e\x61\x6d\x65\x28\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x69\x6e\x63\x6c\x75\x64\x65\x49\x6e\x66\x65\x72\x72\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x3f\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x64\x69\x73\x70\x6c\x61\x79\x4e\x61\x6d\x65\x20\x7c\x7c\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x6e\x61\x6d\x65\x20\x3a\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x6e\x61\x6d\x65\x20\x7c\x7c\x20\x69\x6e\x63\x6c\x75\x64\x65\x49\x6e\x66\x65\x72\x72\x65\x64\x20\x26\x26\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x5f\x5f\x6e\x61\x6d\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6f\x72\x6d\x61\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4e\x61\x6d\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x69\x73\x52\x6f\x6f\x74\x20\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x6e\x61\x6d\x65\x20\x3d\x20\x67\x65\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x4e\x61\x6d\x65\x28\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x6e\x61\x6d\x65\x20\x26\x26\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x5f\x5f\x66\x69\x6c\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x61\x74\x63\x68\x20\x3d\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x5f\x5f\x66\x69\x6c\x65\x2e\x6d\x61\x74\x63\x68\x28\x2f\x28\x5b\x5e\x2f\x5c\x5c\x5d\x2b\x29\x5c\x2e\x5c\x77\x2b\x24\x2f\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6d\x61\x74\x63\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x61\x6d\x65\x20\x3d\x20\x6d\x61\x74\x63\x68\x5b\x31\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x21\x6e\x61\x6d\x65\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x26\x26\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x66\x65\x72\x46\x72\x6f\x6d\x52\x65\x67\x69\x73\x74\x72\x79\x20\x3d\x20\x28\x72\x65\x67\x69\x73\x74\x72\x79\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x72\x65\x67\x69\x73\x74\x72\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x72\x65\x67\x69\x73\x74\x72\x79\x5b\x6b\x65\x79\x5d\x20\x3d\x3d\x3d\x20\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6b\x65\x79\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x6e\x61\x6d\x65\x20\x3d\x20\x69\x6e\x66\x65\x72\x46\x72\x6f\x6d\x52\x65\x67\x69\x73\x74\x72\x79\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x20\x7c\x7c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x2e\x74\x79\x70\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x29\x20\x7c\x7c\x20\x69\x6e\x66\x65\x72\x46\x72\x6f\x6d\x52\x65\x67\x69\x73\x74\x72\x79\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x61\x70\x70\x43\x6f\x6e\x74\x65\x78\x74\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x61\x6d\x65\x20\x3f\x20\x63\x6c\x61\x73\x73\x69\x66\x79\x28\x6e\x61\x6d\x65\x29\x20\x3a\x20\x69\x73\x52\x6f\x6f\x74\x20\x3f\x20\x60\x41\x70\x70\x60\x20\x3a\x20\x60\x41\x6e\x6f\x6e\x79\x6d\x6f\x75\x73\x60\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x43\x6c\x61\x73\x73\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x76\x61\x6c\x75\x65\x29\x20\x26\x26\x20\x22\x5f\x5f\x76\x63\x63\x4f\x70\x74\x73\x22\x20\x69\x6e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6d\x70\x75\x74\x65\x64\x20\x3d\x20\x28\x67\x65\x74\x74\x65\x72\x4f\x72\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x64\x65\x62\x75\x67\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6f\x6d\x70\x75\x74\x65\x64\x24\x31\x28\x67\x65\x74\x74\x65\x72\x4f\x72\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x64\x65\x62\x75\x67\x4f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x69\x73\x49\x6e\x53\x53\x52\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x53\x65\x74\x75\x70\x29\x3b\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x73\x28\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x64\x65\x66\x69\x6e\x65\x45\x6d\x69\x74\x73\x28\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x64\x65\x66\x69\x6e\x65\x45\x78\x70\x6f\x73\x65\x28\x65\x78\x70\x6f\x73\x65\x64\x29\x20\x7b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x69\x74\x68\x44\x65\x66\x61\x75\x6c\x74\x73\x28\x70\x72\x6f\x70\x73\x2c\x20\x64\x65\x66\x61\x75\x6c\x74\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x75\x73\x65\x53\x6c\x6f\x74\x73\x28\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x43\x6f\x6e\x74\x65\x78\x74\x28\x29\x2e\x73\x6c\x6f\x74\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x75\x73\x65\x41\x74\x74\x72\x73\x28\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x67\x65\x74\x43\x6f\x6e\x74\x65\x78\x74\x28\x29\x2e\x61\x74\x74\x72\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x43\x6f\x6e\x74\x65\x78\x74\x28\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x20\x3d\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x2e\x73\x65\x74\x75\x70\x43\x6f\x6e\x74\x65\x78\x74\x20\x7c\x7c\x20\x28\x69\x2e\x73\x65\x74\x75\x70\x43\x6f\x6e\x74\x65\x78\x74\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x53\x65\x74\x75\x70\x43\x6f\x6e\x74\x65\x78\x74\x28\x69\x29\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6d\x65\x72\x67\x65\x44\x65\x66\x61\x75\x6c\x74\x73\x28\x72\x61\x77\x2c\x20\x64\x65\x66\x61\x75\x6c\x74\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x70\x73\x20\x3d\x20\x69\x73\x41\x72\x72\x61\x79\x28\x72\x61\x77\x29\x20\x3f\x20\x72\x61\x77\x2e\x72\x65\x64\x75\x63\x65\x28\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x2c\x20\x70\x32\x29\x20\x3d\x3e\x20\x28\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x5b\x70\x32\x5d\x20\x3d\x20\x7b\x7d\x2c\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x64\x29\x2c\x20\x7b\x7d\x29\x20\x3a\x20\x72\x61\x77\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x64\x65\x66\x61\x75\x6c\x74\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x70\x74\x20\x3d\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x6f\x70\x74\x29\x20\x7c\x7c\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x6f\x70\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x7b\x20\x74\x79\x70\x65\x3a\x20\x6f\x70\x74\x2c\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x20\x64\x65\x66\x61\x75\x6c\x74\x73\x5b\x6b\x65\x79\x5d\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x70\x74\x2e\x64\x65\x66\x61\x75\x6c\x74\x20\x3d\x20\x64\x65\x66\x61\x75\x6c\x74\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6f\x70\x74\x20\x3d\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x7b\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x20\x64\x65\x66\x61\x75\x6c\x74\x73\x5b\x6b\x65\x79\x5d\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x6f\x70\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x50\x72\x6f\x70\x73\x52\x65\x73\x74\x50\x72\x6f\x78\x79\x28\x70\x72\x6f\x70\x73\x2c\x20\x65\x78\x63\x6c\x75\x64\x65\x64\x4b\x65\x79\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x74\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x65\x78\x63\x6c\x75\x64\x65\x64\x4b\x65\x79\x73\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x72\x65\x74\x2c\x20\x6b\x65\x79\x2c\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x67\x65\x74\x3a\x20\x28\x29\x20\x3d\x3e\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x69\x74\x68\x41\x73\x79\x6e\x63\x43\x6f\x6e\x74\x65\x78\x74\x28\x67\x65\x74\x41\x77\x61\x69\x74\x61\x62\x6c\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x74\x78\x20\x3d\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x6c\x65\x74\x20\x61\x77\x61\x69\x74\x61\x62\x6c\x65\x20\x3d\x20\x67\x65\x74\x41\x77\x61\x69\x74\x61\x62\x6c\x65\x28\x29\x3b\x0a\x20\x20\x75\x6e\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x50\x72\x6f\x6d\x69\x73\x65\x28\x61\x77\x61\x69\x74\x61\x62\x6c\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x61\x77\x61\x69\x74\x61\x62\x6c\x65\x20\x3d\x20\x61\x77\x61\x69\x74\x61\x62\x6c\x65\x2e\x63\x61\x74\x63\x68\x28\x28\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x63\x74\x78\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x72\x6f\x77\x20\x65\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5b\x61\x77\x61\x69\x74\x61\x62\x6c\x65\x2c\x20\x28\x29\x20\x3d\x3e\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x63\x74\x78\x29\x5d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x68\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x4f\x72\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x20\x3d\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x69\x66\x20\x28\x6c\x20\x3d\x3d\x3d\x20\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x70\x72\x6f\x70\x73\x4f\x72\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x26\x26\x20\x21\x69\x73\x41\x72\x72\x61\x79\x28\x70\x72\x6f\x70\x73\x4f\x72\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x56\x4e\x6f\x64\x65\x28\x70\x72\x6f\x70\x73\x4f\x72\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x5b\x70\x72\x6f\x70\x73\x4f\x72\x43\x68\x69\x6c\x64\x72\x65\x6e\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x4f\x72\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x70\x72\x6f\x70\x73\x4f\x72\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6c\x20\x3e\x20\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x41\x72\x72\x61\x79\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x2e\x73\x6c\x69\x63\x65\x2e\x63\x61\x6c\x6c\x28\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2c\x20\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6c\x20\x3d\x3d\x3d\x20\x33\x20\x26\x26\x20\x69\x73\x56\x4e\x6f\x64\x65\x28\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x5b\x63\x68\x69\x6c\x64\x72\x65\x6e\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x74\x79\x70\x65\x2c\x20\x70\x72\x6f\x70\x73\x4f\x72\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x73\x73\x72\x43\x6f\x6e\x74\x65\x78\x74\x4b\x65\x79\x20\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x28\x60\x60\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x75\x73\x65\x53\x53\x52\x43\x6f\x6e\x74\x65\x78\x74\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x74\x78\x20\x3d\x20\x69\x6e\x6a\x65\x63\x74\x28\x73\x73\x72\x43\x6f\x6e\x74\x65\x78\x74\x4b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x63\x74\x78\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x77\x61\x72\x6e\x24\x31\x28\x60\x53\x65\x72\x76\x65\x72\x20\x72\x65\x6e\x64\x65\x72\x69\x6e\x67\x20\x63\x6f\x6e\x74\x65\x78\x74\x20\x6e\x6f\x74\x20\x70\x72\x6f\x76\x69\x64\x65\x64\x2e\x20\x4d\x61\x6b\x65\x20\x73\x75\x72\x65\x20\x74\x6f\x20\x6f\x6e\x6c\x79\x20\x63\x61\x6c\x6c\x20\x75\x73\x65\x53\x53\x52\x43\x6f\x6e\x74\x65\x78\x74\x28\x29\x20\x63\x6f\x6e\x64\x69\x74\x69\x6f\x6e\x61\x6c\x6c\x79\x20\x69\x6e\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x20\x62\x75\x69\x6c\x64\x2e\x60\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x74\x78\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x69\x74\x43\x75\x73\x74\x6f\x6d\x46\x6f\x72\x6d\x61\x74\x74\x65\x72\x28\x29\x20\x7b\x0a\x20\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x69\x74\x68\x4d\x65\x6d\x6f\x28\x6d\x65\x6d\x6f\x2c\x20\x72\x65\x6e\x64\x65\x72\x32\x2c\x20\x63\x61\x63\x68\x65\x2c\x20\x69\x6e\x64\x65\x78\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x64\x20\x3d\x20\x63\x61\x63\x68\x65\x5b\x69\x6e\x64\x65\x78\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x63\x61\x63\x68\x65\x64\x20\x26\x26\x20\x69\x73\x4d\x65\x6d\x6f\x53\x61\x6d\x65\x28\x63\x61\x63\x68\x65\x64\x2c\x20\x6d\x65\x6d\x6f\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x61\x63\x68\x65\x64\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x74\x20\x3d\x20\x72\x65\x6e\x64\x65\x72\x32\x28\x29\x3b\x0a\x20\x20\x72\x65\x74\x2e\x6d\x65\x6d\x6f\x20\x3d\x20\x6d\x65\x6d\x6f\x2e\x73\x6c\x69\x63\x65\x28\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x61\x63\x68\x65\x5b\x69\x6e\x64\x65\x78\x5d\x20\x3d\x20\x72\x65\x74\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x73\x4d\x65\x6d\x6f\x53\x61\x6d\x65\x28\x63\x61\x63\x68\x65\x64\x2c\x20\x6d\x65\x6d\x6f\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x76\x20\x3d\x20\x63\x61\x63\x68\x65\x64\x2e\x6d\x65\x6d\x6f\x3b\x0a\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x2e\x6c\x65\x6e\x67\x74\x68\x20\x21\x3d\x20\x6d\x65\x6d\x6f\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x70\x72\x65\x76\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x68\x61\x73\x43\x68\x61\x6e\x67\x65\x64\x28\x70\x72\x65\x76\x5b\x69\x5d\x2c\x20\x6d\x65\x6d\x6f\x5b\x69\x5d\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x42\x6c\x6f\x63\x6b\x54\x72\x65\x65\x45\x6e\x61\x62\x6c\x65\x64\x20\x3e\x20\x30\x20\x26\x26\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x75\x72\x72\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x2e\x70\x75\x73\x68\x28\x63\x61\x63\x68\x65\x64\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x76\x65\x72\x73\x69\x6f\x6e\x20\x3d\x20\x22\x33\x2e\x32\x2e\x33\x37\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x5f\x73\x73\x72\x55\x74\x69\x6c\x73\x20\x3d\x20\x7b\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x2c\x0a\x20\x20\x73\x65\x74\x75\x70\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x72\x65\x6e\x64\x65\x72\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x52\x6f\x6f\x74\x2c\x0a\x20\x20\x73\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x52\x65\x6e\x64\x65\x72\x69\x6e\x67\x49\x6e\x73\x74\x61\x6e\x63\x65\x2c\x0a\x20\x20\x69\x73\x56\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x56\x4e\x6f\x64\x65\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x73\x72\x55\x74\x69\x6c\x73\x20\x3d\x20\x5f\x73\x73\x72\x55\x74\x69\x6c\x73\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x6f\x6c\x76\x65\x46\x69\x6c\x74\x65\x72\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6d\x70\x61\x74\x55\x74\x69\x6c\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x73\x76\x67\x4e\x53\x20\x3d\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x64\x6f\x63\x20\x3d\x20\x74\x79\x70\x65\x6f\x66\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x20\x21\x3d\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x3f\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x20\x3a\x20\x6e\x75\x6c\x6c\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x64\x6f\x63\x20\x26\x26\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x64\x6f\x63\x2e\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x28\x22\x74\x65\x6d\x70\x6c\x61\x74\x65\x22\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6e\x6f\x64\x65\x4f\x70\x73\x20\x3d\x20\x7b\x0a\x20\x20\x69\x6e\x73\x65\x72\x74\x3a\x20\x28\x63\x68\x69\x6c\x64\x2c\x20\x70\x61\x72\x65\x6e\x74\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x2e\x69\x6e\x73\x65\x72\x74\x42\x65\x66\x6f\x72\x65\x28\x63\x68\x69\x6c\x64\x2c\x20\x61\x6e\x63\x68\x6f\x72\x20\x7c\x7c\x20\x6e\x75\x6c\x6c\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x72\x65\x6d\x6f\x76\x65\x3a\x20\x28\x63\x68\x69\x6c\x64\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x63\x68\x69\x6c\x64\x2e\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x72\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x2e\x72\x65\x6d\x6f\x76\x65\x43\x68\x69\x6c\x64\x28\x63\x68\x69\x6c\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x3a\x20\x28\x74\x61\x67\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x69\x73\x2c\x20\x70\x72\x6f\x70\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6c\x20\x3d\x20\x69\x73\x53\x56\x47\x20\x3f\x20\x64\x6f\x63\x2e\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x4e\x53\x28\x73\x76\x67\x4e\x53\x2c\x20\x74\x61\x67\x29\x20\x3a\x20\x64\x6f\x63\x2e\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x28\x74\x61\x67\x2c\x20\x69\x73\x20\x3f\x20\x7b\x20\x69\x73\x20\x7d\x20\x3a\x20\x76\x6f\x69\x64\x20\x30\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x61\x67\x20\x3d\x3d\x3d\x20\x22\x73\x65\x6c\x65\x63\x74\x22\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x70\x72\x6f\x70\x73\x2e\x6d\x75\x6c\x74\x69\x70\x6c\x65\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x22\x6d\x75\x6c\x74\x69\x70\x6c\x65\x22\x2c\x20\x70\x72\x6f\x70\x73\x2e\x6d\x75\x6c\x74\x69\x70\x6c\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x6c\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x3a\x20\x28\x74\x65\x78\x74\x29\x20\x3d\x3e\x20\x64\x6f\x63\x2e\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x4e\x6f\x64\x65\x28\x74\x65\x78\x74\x29\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x6d\x65\x6e\x74\x3a\x20\x28\x74\x65\x78\x74\x29\x20\x3d\x3e\x20\x64\x6f\x63\x2e\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x6d\x65\x6e\x74\x28\x74\x65\x78\x74\x29\x2c\x0a\x20\x20\x73\x65\x74\x54\x65\x78\x74\x3a\x20\x28\x6e\x6f\x64\x65\x2c\x20\x74\x65\x78\x74\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x6e\x6f\x64\x65\x2e\x6e\x6f\x64\x65\x56\x61\x6c\x75\x65\x20\x3d\x20\x74\x65\x78\x74\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x73\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x54\x65\x78\x74\x3a\x20\x28\x65\x6c\x2c\x20\x74\x65\x78\x74\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x74\x65\x78\x74\x43\x6f\x6e\x74\x65\x6e\x74\x20\x3d\x20\x74\x65\x78\x74\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x3a\x20\x28\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x6e\x6f\x64\x65\x2e\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x3a\x20\x28\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x6e\x6f\x64\x65\x2e\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x2c\x0a\x20\x20\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72\x3a\x20\x28\x73\x65\x6c\x65\x63\x74\x6f\x72\x29\x20\x3d\x3e\x20\x64\x6f\x63\x2e\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72\x28\x73\x65\x6c\x65\x63\x74\x6f\x72\x29\x2c\x0a\x20\x20\x73\x65\x74\x53\x63\x6f\x70\x65\x49\x64\x28\x65\x6c\x2c\x20\x69\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x69\x64\x2c\x20\x22\x22\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x63\x6c\x6f\x6e\x65\x4e\x6f\x64\x65\x28\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6c\x6f\x6e\x65\x64\x20\x3d\x20\x65\x6c\x2e\x63\x6c\x6f\x6e\x65\x4e\x6f\x64\x65\x28\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x60\x5f\x76\x61\x6c\x75\x65\x60\x20\x69\x6e\x20\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6c\x6f\x6e\x65\x64\x2e\x5f\x76\x61\x6c\x75\x65\x20\x3d\x20\x65\x6c\x2e\x5f\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6c\x6f\x6e\x65\x64\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x69\x6e\x73\x65\x72\x74\x53\x74\x61\x74\x69\x63\x43\x6f\x6e\x74\x65\x6e\x74\x28\x63\x6f\x6e\x74\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x2c\x20\x61\x6e\x63\x68\x6f\x72\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x73\x74\x61\x72\x74\x2c\x20\x65\x6e\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x62\x65\x66\x6f\x72\x65\x20\x3d\x20\x61\x6e\x63\x68\x6f\x72\x20\x3f\x20\x61\x6e\x63\x68\x6f\x72\x2e\x70\x72\x65\x76\x69\x6f\x75\x73\x53\x69\x62\x6c\x69\x6e\x67\x20\x3a\x20\x70\x61\x72\x65\x6e\x74\x2e\x6c\x61\x73\x74\x43\x68\x69\x6c\x64\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x74\x61\x72\x74\x20\x26\x26\x20\x28\x73\x74\x61\x72\x74\x20\x3d\x3d\x3d\x20\x65\x6e\x64\x20\x7c\x7c\x20\x73\x74\x61\x72\x74\x2e\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x74\x72\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x2e\x69\x6e\x73\x65\x72\x74\x42\x65\x66\x6f\x72\x65\x28\x73\x74\x61\x72\x74\x2e\x63\x6c\x6f\x6e\x65\x4e\x6f\x64\x65\x28\x74\x72\x75\x65\x29\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x74\x61\x72\x74\x20\x3d\x3d\x3d\x20\x65\x6e\x64\x20\x7c\x7c\x20\x21\x28\x73\x74\x61\x72\x74\x20\x3d\x20\x73\x74\x61\x72\x74\x2e\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c\x20\x3d\x20\x69\x73\x53\x56\x47\x20\x3f\x20\x60\x3c\x73\x76\x67\x3e\x24\x7b\x63\x6f\x6e\x74\x65\x6e\x74\x7d\x3c\x2f\x73\x76\x67\x3e\x60\x20\x3a\x20\x63\x6f\x6e\x74\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x20\x3d\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x63\x6f\x6e\x74\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x53\x56\x47\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x77\x72\x61\x70\x70\x65\x72\x20\x3d\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x2e\x66\x69\x72\x73\x74\x43\x68\x69\x6c\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x77\x72\x61\x70\x70\x65\x72\x2e\x66\x69\x72\x73\x74\x43\x68\x69\x6c\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x2e\x61\x70\x70\x65\x6e\x64\x43\x68\x69\x6c\x64\x28\x77\x72\x61\x70\x70\x65\x72\x2e\x66\x69\x72\x73\x74\x43\x68\x69\x6c\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x65\x6d\x70\x6c\x61\x74\x65\x2e\x72\x65\x6d\x6f\x76\x65\x43\x68\x69\x6c\x64\x28\x77\x72\x61\x70\x70\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x72\x65\x6e\x74\x2e\x69\x6e\x73\x65\x72\x74\x42\x65\x66\x6f\x72\x65\x28\x74\x65\x6d\x70\x6c\x61\x74\x65\x2c\x20\x61\x6e\x63\x68\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5b\x0a\x20\x20\x20\x20\x20\x20\x62\x65\x66\x6f\x72\x65\x20\x3f\x20\x62\x65\x66\x6f\x72\x65\x2e\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x20\x3a\x20\x70\x61\x72\x65\x6e\x74\x2e\x66\x69\x72\x73\x74\x43\x68\x69\x6c\x64\x2c\x0a\x20\x20\x20\x20\x20\x20\x61\x6e\x63\x68\x6f\x72\x20\x3f\x20\x61\x6e\x63\x68\x6f\x72\x2e\x70\x72\x65\x76\x69\x6f\x75\x73\x53\x69\x62\x6c\x69\x6e\x67\x20\x3a\x20\x70\x61\x72\x65\x6e\x74\x2e\x6c\x61\x73\x74\x43\x68\x69\x6c\x64\x0a\x20\x20\x20\x20\x5d\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x61\x74\x63\x68\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x65\x73\x20\x3d\x20\x65\x6c\x2e\x5f\x76\x74\x63\x3b\x0a\x20\x20\x69\x66\x20\x28\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x65\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x28\x76\x61\x6c\x75\x65\x20\x3f\x20\x5b\x76\x61\x6c\x75\x65\x2c\x20\x2e\x2e\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x65\x73\x5d\x20\x3a\x20\x5b\x2e\x2e\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x65\x73\x5d\x29\x2e\x6a\x6f\x69\x6e\x28\x22\x20\x22\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x72\x65\x6d\x6f\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x22\x63\x6c\x61\x73\x73\x22\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x53\x56\x47\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x22\x63\x6c\x61\x73\x73\x22\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x63\x6c\x61\x73\x73\x4e\x61\x6d\x65\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x61\x74\x63\x68\x53\x74\x79\x6c\x65\x28\x65\x6c\x2c\x20\x70\x72\x65\x76\x2c\x20\x6e\x65\x78\x74\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x74\x79\x6c\x65\x20\x3d\x20\x65\x6c\x2e\x73\x74\x79\x6c\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x43\x73\x73\x53\x74\x72\x69\x6e\x67\x20\x3d\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x6e\x65\x78\x74\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x20\x26\x26\x20\x21\x69\x73\x43\x73\x73\x53\x74\x72\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x6e\x65\x78\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x53\x74\x79\x6c\x65\x28\x73\x74\x79\x6c\x65\x2c\x20\x6b\x65\x79\x2c\x20\x6e\x65\x78\x74\x5b\x6b\x65\x79\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x20\x26\x26\x20\x21\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x70\x72\x65\x76\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x70\x72\x65\x76\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x5b\x6b\x65\x79\x5d\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x53\x74\x79\x6c\x65\x28\x73\x74\x79\x6c\x65\x2c\x20\x6b\x65\x79\x2c\x20\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x75\x72\x72\x65\x6e\x74\x44\x69\x73\x70\x6c\x61\x79\x20\x3d\x20\x73\x74\x79\x6c\x65\x2e\x64\x69\x73\x70\x6c\x61\x79\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x43\x73\x73\x53\x74\x72\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x20\x21\x3d\x3d\x20\x6e\x65\x78\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x2e\x63\x73\x73\x54\x65\x78\x74\x20\x3d\x20\x6e\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x70\x72\x65\x76\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x72\x65\x6d\x6f\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x22\x73\x74\x79\x6c\x65\x22\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x22\x5f\x76\x6f\x64\x22\x20\x69\x6e\x20\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x2e\x64\x69\x73\x70\x6c\x61\x79\x20\x3d\x20\x63\x75\x72\x72\x65\x6e\x74\x44\x69\x73\x70\x6c\x61\x79\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x69\x6d\x70\x6f\x72\x74\x61\x6e\x74\x52\x45\x20\x3d\x20\x2f\x5c\x73\x2a\x21\x69\x6d\x70\x6f\x72\x74\x61\x6e\x74\x24\x2f\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x53\x74\x79\x6c\x65\x28\x73\x74\x79\x6c\x65\x2c\x20\x6e\x61\x6d\x65\x2c\x20\x76\x61\x6c\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x61\x6c\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x76\x29\x20\x3d\x3e\x20\x73\x65\x74\x53\x74\x79\x6c\x65\x28\x73\x74\x79\x6c\x65\x2c\x20\x6e\x61\x6d\x65\x2c\x20\x76\x29\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x20\x3d\x20\x22\x22\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x61\x6d\x65\x2e\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68\x28\x22\x2d\x2d\x22\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x2e\x73\x65\x74\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x6e\x61\x6d\x65\x2c\x20\x76\x61\x6c\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x66\x69\x78\x65\x64\x20\x3d\x20\x61\x75\x74\x6f\x50\x72\x65\x66\x69\x78\x28\x73\x74\x79\x6c\x65\x2c\x20\x6e\x61\x6d\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x6d\x70\x6f\x72\x74\x61\x6e\x74\x52\x45\x2e\x74\x65\x73\x74\x28\x76\x61\x6c\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x2e\x73\x65\x74\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x28\x70\x72\x65\x66\x69\x78\x65\x64\x29\x2c\x20\x76\x61\x6c\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x69\x6d\x70\x6f\x72\x74\x61\x6e\x74\x52\x45\x2c\x20\x22\x22\x29\x2c\x20\x22\x69\x6d\x70\x6f\x72\x74\x61\x6e\x74\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x5b\x70\x72\x65\x66\x69\x78\x65\x64\x5d\x20\x3d\x20\x76\x61\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x66\x69\x78\x65\x73\x20\x3d\x20\x5b\x22\x57\x65\x62\x6b\x69\x74\x22\x2c\x20\x22\x4d\x6f\x7a\x22\x2c\x20\x22\x6d\x73\x22\x5d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x66\x69\x78\x43\x61\x63\x68\x65\x20\x3d\x20\x7b\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x61\x75\x74\x6f\x50\x72\x65\x66\x69\x78\x28\x73\x74\x79\x6c\x65\x2c\x20\x72\x61\x77\x4e\x61\x6d\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x63\x68\x65\x64\x20\x3d\x20\x70\x72\x65\x66\x69\x78\x43\x61\x63\x68\x65\x5b\x72\x61\x77\x4e\x61\x6d\x65\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x63\x61\x63\x68\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x61\x63\x68\x65\x64\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6c\x65\x74\x20\x6e\x61\x6d\x65\x20\x3d\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x72\x61\x77\x4e\x61\x6d\x65\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x6e\x61\x6d\x65\x20\x21\x3d\x3d\x20\x22\x66\x69\x6c\x74\x65\x72\x22\x20\x26\x26\x20\x6e\x61\x6d\x65\x20\x69\x6e\x20\x73\x74\x79\x6c\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x65\x66\x69\x78\x43\x61\x63\x68\x65\x5b\x72\x61\x77\x4e\x61\x6d\x65\x5d\x20\x3d\x20\x6e\x61\x6d\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6e\x61\x6d\x65\x20\x3d\x20\x63\x61\x70\x69\x74\x61\x6c\x69\x7a\x65\x28\x6e\x61\x6d\x65\x29\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x70\x72\x65\x66\x69\x78\x65\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x65\x66\x69\x78\x65\x64\x20\x3d\x20\x70\x72\x65\x66\x69\x78\x65\x73\x5b\x69\x5d\x20\x2b\x20\x6e\x61\x6d\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x66\x69\x78\x65\x64\x20\x69\x6e\x20\x73\x74\x79\x6c\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x65\x66\x69\x78\x43\x61\x63\x68\x65\x5b\x72\x61\x77\x4e\x61\x6d\x65\x5d\x20\x3d\x20\x70\x72\x65\x66\x69\x78\x65\x64\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x61\x77\x4e\x61\x6d\x65\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x78\x6c\x69\x6e\x6b\x4e\x53\x20\x3d\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x61\x74\x63\x68\x41\x74\x74\x72\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x69\x73\x53\x56\x47\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x53\x56\x47\x20\x26\x26\x20\x6b\x65\x79\x2e\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68\x28\x22\x78\x6c\x69\x6e\x6b\x3a\x22\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x72\x65\x6d\x6f\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4e\x53\x28\x78\x6c\x69\x6e\x6b\x4e\x53\x2c\x20\x6b\x65\x79\x2e\x73\x6c\x69\x63\x65\x28\x36\x2c\x20\x6b\x65\x79\x2e\x6c\x65\x6e\x67\x74\x68\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4e\x53\x28\x78\x6c\x69\x6e\x6b\x4e\x53\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x42\x6f\x6f\x6c\x65\x61\x6e\x20\x3d\x20\x69\x73\x53\x70\x65\x63\x69\x61\x6c\x42\x6f\x6f\x6c\x65\x61\x6e\x41\x74\x74\x72\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x7c\x7c\x20\x69\x73\x42\x6f\x6f\x6c\x65\x61\x6e\x20\x26\x26\x20\x21\x69\x6e\x63\x6c\x75\x64\x65\x42\x6f\x6f\x6c\x65\x61\x6e\x41\x74\x74\x72\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x72\x65\x6d\x6f\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x6b\x65\x79\x2c\x20\x69\x73\x42\x6f\x6f\x6c\x65\x61\x6e\x20\x3f\x20\x22\x22\x20\x3a\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x61\x74\x63\x68\x44\x4f\x4d\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c\x22\x20\x7c\x7c\x20\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x74\x65\x78\x74\x43\x6f\x6e\x74\x65\x6e\x74\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x65\x6c\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x22\x22\x20\x3a\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x76\x61\x6c\x75\x65\x22\x20\x26\x26\x20\x65\x6c\x2e\x74\x61\x67\x4e\x61\x6d\x65\x20\x21\x3d\x3d\x20\x22\x50\x52\x4f\x47\x52\x45\x53\x53\x22\x20\x26\x26\x20\x21\x65\x6c\x2e\x74\x61\x67\x4e\x61\x6d\x65\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x22\x2d\x22\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x76\x61\x6c\x75\x65\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x20\x3d\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x22\x22\x20\x3a\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x76\x61\x6c\x75\x65\x20\x21\x3d\x3d\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x20\x7c\x7c\x20\x65\x6c\x2e\x74\x61\x67\x4e\x61\x6d\x65\x20\x3d\x3d\x3d\x20\x22\x4f\x50\x54\x49\x4f\x4e\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x72\x65\x6d\x6f\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6c\x65\x74\x20\x6e\x65\x65\x64\x52\x65\x6d\x6f\x76\x65\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x3d\x3d\x3d\x20\x22\x22\x20\x7c\x7c\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x79\x70\x65\x20\x3d\x20\x74\x79\x70\x65\x6f\x66\x20\x65\x6c\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x62\x6f\x6f\x6c\x65\x61\x6e\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x69\x6e\x63\x6c\x75\x64\x65\x42\x6f\x6f\x6c\x65\x61\x6e\x41\x74\x74\x72\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x26\x26\x20\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x73\x74\x72\x69\x6e\x67\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x22\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x65\x64\x52\x65\x6d\x6f\x76\x65\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x6e\x75\x6d\x62\x65\x72\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x65\x64\x52\x65\x6d\x6f\x76\x65\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x74\x72\x79\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x20\x63\x61\x74\x63\x68\x20\x28\x65\x29\x20\x7b\x0a\x20\x20\x7d\x0a\x20\x20\x6e\x65\x65\x64\x52\x65\x6d\x6f\x76\x65\x20\x26\x26\x20\x65\x6c\x2e\x72\x65\x6d\x6f\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x6b\x65\x79\x29\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x5b\x5f\x67\x65\x74\x4e\x6f\x77\x2c\x20\x73\x6b\x69\x70\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x43\x68\x65\x63\x6b\x5d\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x5f\x67\x65\x74\x4e\x6f\x77\x32\x20\x3d\x20\x44\x61\x74\x65\x2e\x6e\x6f\x77\x3b\x0a\x20\x20\x6c\x65\x74\x20\x73\x6b\x69\x70\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x43\x68\x65\x63\x6b\x32\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x77\x69\x6e\x64\x6f\x77\x20\x21\x3d\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x44\x61\x74\x65\x2e\x6e\x6f\x77\x28\x29\x20\x3e\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x63\x72\x65\x61\x74\x65\x45\x76\x65\x6e\x74\x28\x22\x45\x76\x65\x6e\x74\x22\x29\x2e\x74\x69\x6d\x65\x53\x74\x61\x6d\x70\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x5f\x67\x65\x74\x4e\x6f\x77\x32\x20\x3d\x20\x70\x65\x72\x66\x6f\x72\x6d\x61\x6e\x63\x65\x2e\x6e\x6f\x77\x2e\x62\x69\x6e\x64\x28\x70\x65\x72\x66\x6f\x72\x6d\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x66\x4d\x61\x74\x63\x68\x20\x3d\x20\x6e\x61\x76\x69\x67\x61\x74\x6f\x72\x2e\x75\x73\x65\x72\x41\x67\x65\x6e\x74\x2e\x6d\x61\x74\x63\x68\x28\x2f\x66\x69\x72\x65\x66\x6f\x78\x5c\x2f\x28\x5c\x64\x2b\x29\x2f\x69\x29\x3b\x0a\x20\x20\x20\x20\x73\x6b\x69\x70\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x43\x68\x65\x63\x6b\x32\x20\x3d\x20\x21\x21\x28\x66\x66\x4d\x61\x74\x63\x68\x20\x26\x26\x20\x4e\x75\x6d\x62\x65\x72\x28\x66\x66\x4d\x61\x74\x63\x68\x5b\x31\x5d\x29\x20\x3c\x3d\x20\x35\x33\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5b\x5f\x67\x65\x74\x4e\x6f\x77\x32\x2c\x20\x73\x6b\x69\x70\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x43\x68\x65\x63\x6b\x32\x5d\x3b\x0a\x7d\x29\x28\x29\x3b\x0a\x6c\x65\x74\x20\x63\x61\x63\x68\x65\x64\x4e\x6f\x77\x20\x3d\x20\x30\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x50\x72\x6f\x6d\x69\x73\x65\x2e\x72\x65\x73\x6f\x6c\x76\x65\x28\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x65\x74\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x61\x63\x68\x65\x64\x4e\x6f\x77\x20\x3d\x20\x30\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x4e\x6f\x77\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x63\x61\x63\x68\x65\x64\x4e\x6f\x77\x20\x7c\x7c\x20\x28\x70\x2e\x74\x68\x65\x6e\x28\x72\x65\x73\x65\x74\x29\x2c\x20\x63\x61\x63\x68\x65\x64\x4e\x6f\x77\x20\x3d\x20\x5f\x67\x65\x74\x4e\x6f\x77\x28\x29\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x65\x76\x65\x6e\x74\x2c\x20\x68\x61\x6e\x64\x6c\x65\x72\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x65\x6c\x2e\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x76\x65\x6e\x74\x2c\x20\x68\x61\x6e\x64\x6c\x65\x72\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x6d\x6f\x76\x65\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x65\x76\x65\x6e\x74\x2c\x20\x68\x61\x6e\x64\x6c\x65\x72\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x65\x6c\x2e\x72\x65\x6d\x6f\x76\x65\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x76\x65\x6e\x74\x2c\x20\x68\x61\x6e\x64\x6c\x65\x72\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x61\x74\x63\x68\x45\x76\x65\x6e\x74\x28\x65\x6c\x2c\x20\x72\x61\x77\x4e\x61\x6d\x65\x2c\x20\x70\x72\x65\x76\x56\x61\x6c\x75\x65\x2c\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x76\x6f\x6b\x65\x72\x73\x20\x3d\x20\x65\x6c\x2e\x5f\x76\x65\x69\x20\x7c\x7c\x20\x28\x65\x6c\x2e\x5f\x76\x65\x69\x20\x3d\x20\x7b\x7d\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x49\x6e\x76\x6f\x6b\x65\x72\x20\x3d\x20\x69\x6e\x76\x6f\x6b\x65\x72\x73\x5b\x72\x61\x77\x4e\x61\x6d\x65\x5d\x3b\x0a\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x20\x26\x26\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x49\x6e\x76\x6f\x6b\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x49\x6e\x76\x6f\x6b\x65\x72\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x5b\x6e\x61\x6d\x65\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x5d\x20\x3d\x20\x70\x61\x72\x73\x65\x4e\x61\x6d\x65\x28\x72\x61\x77\x4e\x61\x6d\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x76\x6f\x6b\x65\x72\x20\x3d\x20\x69\x6e\x76\x6f\x6b\x65\x72\x73\x5b\x72\x61\x77\x4e\x61\x6d\x65\x5d\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x76\x6f\x6b\x65\x72\x28\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x6e\x61\x6d\x65\x2c\x20\x69\x6e\x76\x6f\x6b\x65\x72\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x65\x78\x69\x73\x74\x69\x6e\x67\x49\x6e\x76\x6f\x6b\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x6e\x61\x6d\x65\x2c\x20\x65\x78\x69\x73\x74\x69\x6e\x67\x49\x6e\x76\x6f\x6b\x65\x72\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x6e\x76\x6f\x6b\x65\x72\x73\x5b\x72\x61\x77\x4e\x61\x6d\x65\x5d\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x6f\x70\x74\x69\x6f\x6e\x73\x4d\x6f\x64\x69\x66\x69\x65\x72\x52\x45\x20\x3d\x20\x2f\x28\x3f\x3a\x4f\x6e\x63\x65\x7c\x50\x61\x73\x73\x69\x76\x65\x7c\x43\x61\x70\x74\x75\x72\x65\x29\x24\x2f\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x61\x72\x73\x65\x4e\x61\x6d\x65\x28\x6e\x61\x6d\x65\x29\x20\x7b\x0a\x20\x20\x6c\x65\x74\x20\x6f\x70\x74\x69\x6f\x6e\x73\x3b\x0a\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x69\x6f\x6e\x73\x4d\x6f\x64\x69\x66\x69\x65\x72\x52\x45\x2e\x74\x65\x73\x74\x28\x6e\x61\x6d\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x6f\x70\x74\x69\x6f\x6e\x73\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x6d\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x6d\x20\x3d\x20\x6e\x61\x6d\x65\x2e\x6d\x61\x74\x63\x68\x28\x6f\x70\x74\x69\x6f\x6e\x73\x4d\x6f\x64\x69\x66\x69\x65\x72\x52\x45\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6e\x61\x6d\x65\x20\x3d\x20\x6e\x61\x6d\x65\x2e\x73\x6c\x69\x63\x65\x28\x30\x2c\x20\x6e\x61\x6d\x65\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2d\x20\x6d\x5b\x30\x5d\x2e\x6c\x65\x6e\x67\x74\x68\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6f\x70\x74\x69\x6f\x6e\x73\x5b\x6d\x5b\x30\x5d\x2e\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65\x28\x29\x5d\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5b\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x28\x6e\x61\x6d\x65\x2e\x73\x6c\x69\x63\x65\x28\x32\x29\x29\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x73\x5d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x72\x65\x61\x74\x65\x49\x6e\x76\x6f\x6b\x65\x72\x28\x69\x6e\x69\x74\x69\x61\x6c\x56\x61\x6c\x75\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x76\x6f\x6b\x65\x72\x20\x3d\x20\x28\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x69\x6d\x65\x53\x74\x61\x6d\x70\x20\x3d\x20\x65\x2e\x74\x69\x6d\x65\x53\x74\x61\x6d\x70\x20\x7c\x7c\x20\x5f\x67\x65\x74\x4e\x6f\x77\x28\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x6b\x69\x70\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x43\x68\x65\x63\x6b\x20\x7c\x7c\x20\x74\x69\x6d\x65\x53\x74\x61\x6d\x70\x20\x3e\x3d\x20\x69\x6e\x76\x6f\x6b\x65\x72\x2e\x61\x74\x74\x61\x63\x68\x65\x64\x20\x2d\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x28\x70\x61\x74\x63\x68\x53\x74\x6f\x70\x49\x6d\x6d\x65\x64\x69\x61\x74\x65\x50\x72\x6f\x70\x61\x67\x61\x74\x69\x6f\x6e\x28\x65\x2c\x20\x69\x6e\x76\x6f\x6b\x65\x72\x2e\x76\x61\x6c\x75\x65\x29\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2c\x20\x35\x2c\x20\x5b\x65\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x69\x6e\x76\x6f\x6b\x65\x72\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x69\x6e\x69\x74\x69\x61\x6c\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x69\x6e\x76\x6f\x6b\x65\x72\x2e\x61\x74\x74\x61\x63\x68\x65\x64\x20\x3d\x20\x67\x65\x74\x4e\x6f\x77\x28\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x6e\x76\x6f\x6b\x65\x72\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x61\x74\x63\x68\x53\x74\x6f\x70\x49\x6d\x6d\x65\x64\x69\x61\x74\x65\x50\x72\x6f\x70\x61\x67\x61\x74\x69\x6f\x6e\x28\x65\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x72\x69\x67\x69\x6e\x61\x6c\x53\x74\x6f\x70\x20\x3d\x20\x65\x2e\x73\x74\x6f\x70\x49\x6d\x6d\x65\x64\x69\x61\x74\x65\x50\x72\x6f\x70\x61\x67\x61\x74\x69\x6f\x6e\x3b\x0a\x20\x20\x20\x20\x65\x2e\x73\x74\x6f\x70\x49\x6d\x6d\x65\x64\x69\x61\x74\x65\x50\x72\x6f\x70\x61\x67\x61\x74\x69\x6f\x6e\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x6f\x72\x69\x67\x69\x6e\x61\x6c\x53\x74\x6f\x70\x2e\x63\x61\x6c\x6c\x28\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x2e\x5f\x73\x74\x6f\x70\x70\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x2e\x6d\x61\x70\x28\x28\x66\x6e\x29\x20\x3d\x3e\x20\x28\x65\x32\x29\x20\x3d\x3e\x20\x21\x65\x32\x2e\x5f\x73\x74\x6f\x70\x70\x65\x64\x20\x26\x26\x20\x66\x6e\x20\x26\x26\x20\x66\x6e\x28\x65\x32\x29\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x6e\x61\x74\x69\x76\x65\x4f\x6e\x52\x45\x20\x3d\x20\x2f\x5e\x6f\x6e\x5b\x61\x2d\x7a\x5d\x2f\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x70\x61\x74\x63\x68\x50\x72\x6f\x70\x20\x3d\x20\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x70\x72\x65\x76\x56\x61\x6c\x75\x65\x2c\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x2c\x20\x69\x73\x53\x56\x47\x20\x3d\x20\x66\x61\x6c\x73\x65\x2c\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x63\x6c\x61\x73\x73\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x70\x61\x74\x63\x68\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x73\x74\x79\x6c\x65\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x70\x61\x74\x63\x68\x53\x74\x79\x6c\x65\x28\x65\x6c\x2c\x20\x70\x72\x65\x76\x56\x61\x6c\x75\x65\x2c\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x4f\x6e\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x4d\x6f\x64\x65\x6c\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x6b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x70\x61\x74\x63\x68\x45\x76\x65\x6e\x74\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x70\x72\x65\x76\x56\x61\x6c\x75\x65\x2c\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x5b\x30\x5d\x20\x3d\x3d\x3d\x20\x22\x2e\x22\x20\x3f\x20\x28\x6b\x65\x79\x20\x3d\x20\x6b\x65\x79\x2e\x73\x6c\x69\x63\x65\x28\x31\x29\x2c\x20\x74\x72\x75\x65\x29\x20\x3a\x20\x6b\x65\x79\x5b\x30\x5d\x20\x3d\x3d\x3d\x20\x22\x5e\x22\x20\x3f\x20\x28\x6b\x65\x79\x20\x3d\x20\x6b\x65\x79\x2e\x73\x6c\x69\x63\x65\x28\x31\x29\x2c\x20\x66\x61\x6c\x73\x65\x29\x20\x3a\x20\x73\x68\x6f\x75\x6c\x64\x53\x65\x74\x41\x73\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x70\x61\x74\x63\x68\x44\x4f\x4d\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x2c\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x20\x70\x61\x72\x65\x6e\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x20\x70\x61\x72\x65\x6e\x74\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x74\x72\x75\x65\x2d\x76\x61\x6c\x75\x65\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x74\x72\x75\x65\x56\x61\x6c\x75\x65\x20\x3d\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x66\x61\x6c\x73\x65\x2d\x76\x61\x6c\x75\x65\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x66\x61\x6c\x73\x65\x56\x61\x6c\x75\x65\x20\x3d\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x70\x61\x74\x63\x68\x41\x74\x74\x72\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x6e\x65\x78\x74\x56\x61\x6c\x75\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x68\x6f\x75\x6c\x64\x53\x65\x74\x41\x73\x50\x72\x6f\x70\x28\x65\x6c\x2c\x20\x6b\x65\x79\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x69\x73\x53\x56\x47\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x53\x56\x47\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c\x22\x20\x7c\x7c\x20\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x74\x65\x78\x74\x43\x6f\x6e\x74\x65\x6e\x74\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x69\x6e\x20\x65\x6c\x20\x26\x26\x20\x6e\x61\x74\x69\x76\x65\x4f\x6e\x52\x45\x2e\x74\x65\x73\x74\x28\x6b\x65\x79\x29\x20\x26\x26\x20\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x73\x70\x65\x6c\x6c\x63\x68\x65\x63\x6b\x22\x20\x7c\x7c\x20\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x64\x72\x61\x67\x67\x61\x62\x6c\x65\x22\x20\x7c\x7c\x20\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x74\x72\x61\x6e\x73\x6c\x61\x74\x65\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x66\x6f\x72\x6d\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x6c\x69\x73\x74\x22\x20\x26\x26\x20\x65\x6c\x2e\x74\x61\x67\x4e\x61\x6d\x65\x20\x3d\x3d\x3d\x20\x22\x49\x4e\x50\x55\x54\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x20\x3d\x3d\x3d\x20\x22\x74\x79\x70\x65\x22\x20\x26\x26\x20\x65\x6c\x2e\x74\x61\x67\x4e\x61\x6d\x65\x20\x3d\x3d\x3d\x20\x22\x54\x45\x58\x54\x41\x52\x45\x41\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x6e\x61\x74\x69\x76\x65\x4f\x6e\x52\x45\x2e\x74\x65\x73\x74\x28\x6b\x65\x79\x29\x20\x26\x26\x20\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6b\x65\x79\x20\x69\x6e\x20\x65\x6c\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x64\x65\x66\x69\x6e\x65\x43\x75\x73\x74\x6f\x6d\x45\x6c\x65\x6d\x65\x6e\x74\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x32\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x43\x6f\x6d\x70\x20\x3d\x20\x64\x65\x66\x69\x6e\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x28\x6f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x63\x6c\x61\x73\x73\x20\x56\x75\x65\x43\x75\x73\x74\x6f\x6d\x45\x6c\x65\x6d\x65\x6e\x74\x20\x65\x78\x74\x65\x6e\x64\x73\x20\x56\x75\x65\x45\x6c\x65\x6d\x65\x6e\x74\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x69\x6e\x69\x74\x69\x61\x6c\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x70\x65\x72\x28\x43\x6f\x6d\x70\x2c\x20\x69\x6e\x69\x74\x69\x61\x6c\x50\x72\x6f\x70\x73\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x56\x75\x65\x43\x75\x73\x74\x6f\x6d\x45\x6c\x65\x6d\x65\x6e\x74\x2e\x64\x65\x66\x20\x3d\x20\x43\x6f\x6d\x70\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x56\x75\x65\x43\x75\x73\x74\x6f\x6d\x45\x6c\x65\x6d\x65\x6e\x74\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x64\x65\x66\x69\x6e\x65\x53\x53\x52\x43\x75\x73\x74\x6f\x6d\x45\x6c\x65\x6d\x65\x6e\x74\x20\x3d\x20\x28\x6f\x70\x74\x69\x6f\x6e\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x65\x66\x69\x6e\x65\x43\x75\x73\x74\x6f\x6d\x45\x6c\x65\x6d\x65\x6e\x74\x28\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x29\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x42\x61\x73\x65\x43\x6c\x61\x73\x73\x20\x3d\x20\x74\x79\x70\x65\x6f\x66\x20\x48\x54\x4d\x4c\x45\x6c\x65\x6d\x65\x6e\x74\x20\x21\x3d\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x3f\x20\x48\x54\x4d\x4c\x45\x6c\x65\x6d\x65\x6e\x74\x20\x3a\x20\x63\x6c\x61\x73\x73\x20\x7b\x0a\x7d\x3b\x0a\x63\x6c\x61\x73\x73\x20\x56\x75\x65\x45\x6c\x65\x6d\x65\x6e\x74\x20\x65\x78\x74\x65\x6e\x64\x73\x20\x42\x61\x73\x65\x43\x6c\x61\x73\x73\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x5f\x64\x65\x66\x2c\x20\x5f\x70\x72\x6f\x70\x73\x20\x3d\x20\x7b\x7d\x2c\x20\x68\x79\x64\x72\x61\x74\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x75\x70\x65\x72\x28\x29\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x64\x65\x66\x20\x3d\x20\x5f\x64\x65\x66\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x70\x72\x6f\x70\x73\x20\x3d\x20\x5f\x70\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x63\x6f\x6e\x6e\x65\x63\x74\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x72\x65\x73\x6f\x6c\x76\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x6e\x75\x6d\x62\x65\x72\x50\x72\x6f\x70\x73\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x68\x69\x73\x2e\x73\x68\x61\x64\x6f\x77\x52\x6f\x6f\x74\x20\x26\x26\x20\x68\x79\x64\x72\x61\x74\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x68\x79\x64\x72\x61\x74\x65\x32\x28\x74\x68\x69\x73\x2e\x5f\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x29\x2c\x20\x74\x68\x69\x73\x2e\x73\x68\x61\x64\x6f\x77\x52\x6f\x6f\x74\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x61\x74\x74\x61\x63\x68\x53\x68\x61\x64\x6f\x77\x28\x7b\x20\x6d\x6f\x64\x65\x3a\x20\x22\x6f\x70\x65\x6e\x22\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x6e\x65\x63\x74\x65\x64\x43\x61\x6c\x6c\x62\x61\x63\x6b\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x63\x6f\x6e\x6e\x65\x63\x74\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x74\x68\x69\x73\x2e\x5f\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x72\x65\x73\x6f\x6c\x76\x65\x44\x65\x66\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x64\x69\x73\x63\x6f\x6e\x6e\x65\x63\x74\x65\x64\x43\x61\x6c\x6c\x62\x61\x63\x6b\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x63\x6f\x6e\x6e\x65\x63\x74\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x6e\x65\x78\x74\x54\x69\x63\x6b\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x74\x68\x69\x73\x2e\x5f\x63\x6f\x6e\x6e\x65\x63\x74\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x28\x6e\x75\x6c\x6c\x2c\x20\x74\x68\x69\x73\x2e\x73\x68\x61\x64\x6f\x77\x52\x6f\x6f\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x5f\x72\x65\x73\x6f\x6c\x76\x65\x44\x65\x66\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x68\x69\x73\x2e\x5f\x72\x65\x73\x6f\x6c\x76\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x72\x65\x73\x6f\x6c\x76\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x74\x68\x69\x73\x2e\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x73\x65\x74\x41\x74\x74\x72\x28\x74\x68\x69\x73\x2e\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73\x5b\x69\x5d\x2e\x6e\x61\x6d\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x6e\x65\x77\x20\x4d\x75\x74\x61\x74\x69\x6f\x6e\x4f\x62\x73\x65\x72\x76\x65\x72\x28\x28\x6d\x75\x74\x61\x74\x69\x6f\x6e\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6d\x20\x6f\x66\x20\x6d\x75\x74\x61\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x73\x65\x74\x41\x74\x74\x72\x28\x6d\x2e\x61\x74\x74\x72\x69\x62\x75\x74\x65\x4e\x61\x6d\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x29\x2e\x6f\x62\x73\x65\x72\x76\x65\x28\x74\x68\x69\x73\x2c\x20\x7b\x20\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73\x3a\x20\x74\x72\x75\x65\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x20\x3d\x20\x28\x64\x65\x66\x32\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x70\x72\x6f\x70\x73\x2c\x20\x73\x74\x79\x6c\x65\x73\x20\x7d\x20\x3d\x20\x64\x65\x66\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x73\x4f\x70\x74\x69\x6f\x6e\x73\x20\x3d\x20\x21\x69\x73\x41\x72\x72\x61\x79\x28\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x4b\x65\x79\x73\x20\x3d\x20\x70\x72\x6f\x70\x73\x20\x3f\x20\x68\x61\x73\x4f\x70\x74\x69\x6f\x6e\x73\x20\x3f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x70\x72\x6f\x70\x73\x29\x20\x3a\x20\x70\x72\x6f\x70\x73\x20\x3a\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x6e\x75\x6d\x62\x65\x72\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x68\x61\x73\x4f\x70\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x74\x68\x69\x73\x2e\x5f\x70\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x70\x74\x20\x3d\x20\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6f\x70\x74\x20\x3d\x3d\x3d\x20\x4e\x75\x6d\x62\x65\x72\x20\x7c\x7c\x20\x6f\x70\x74\x20\x26\x26\x20\x6f\x70\x74\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x4e\x75\x6d\x62\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x74\x6f\x4e\x75\x6d\x62\x65\x72\x28\x74\x68\x69\x73\x2e\x5f\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x28\x6e\x75\x6d\x62\x65\x72\x50\x72\x6f\x70\x73\x20\x7c\x7c\x20\x28\x6e\x75\x6d\x62\x65\x72\x50\x72\x6f\x70\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x6e\x75\x6c\x6c\x29\x29\x29\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x6e\x75\x6d\x62\x65\x72\x50\x72\x6f\x70\x73\x20\x3d\x20\x6e\x75\x6d\x62\x65\x72\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x6f\x66\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x74\x68\x69\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6b\x65\x79\x5b\x30\x5d\x20\x21\x3d\x3d\x20\x22\x5f\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x73\x65\x74\x50\x72\x6f\x70\x28\x6b\x65\x79\x2c\x20\x74\x68\x69\x73\x5b\x6b\x65\x79\x5d\x2c\x20\x74\x72\x75\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x6f\x66\x20\x72\x61\x77\x4b\x65\x79\x73\x2e\x6d\x61\x70\x28\x63\x61\x6d\x65\x6c\x69\x7a\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x74\x68\x69\x73\x2c\x20\x6b\x65\x79\x2c\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x67\x65\x74\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x2e\x5f\x67\x65\x74\x50\x72\x6f\x70\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x28\x76\x61\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x73\x65\x74\x50\x72\x6f\x70\x28\x6b\x65\x79\x2c\x20\x76\x61\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x61\x70\x70\x6c\x79\x53\x74\x79\x6c\x65\x73\x28\x73\x74\x79\x6c\x65\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x75\x70\x64\x61\x74\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x73\x79\x6e\x63\x44\x65\x66\x20\x3d\x20\x74\x68\x69\x73\x2e\x5f\x64\x65\x66\x2e\x5f\x5f\x61\x73\x79\x6e\x63\x4c\x6f\x61\x64\x65\x72\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x61\x73\x79\x6e\x63\x44\x65\x66\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x73\x79\x6e\x63\x44\x65\x66\x28\x29\x2e\x74\x68\x65\x6e\x28\x72\x65\x73\x6f\x6c\x76\x65\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x28\x74\x68\x69\x73\x2e\x5f\x64\x65\x66\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x5f\x73\x65\x74\x41\x74\x74\x72\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x74\x68\x69\x73\x2e\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x68\x69\x73\x2e\x5f\x6e\x75\x6d\x62\x65\x72\x50\x72\x6f\x70\x73\x20\x26\x26\x20\x74\x68\x69\x73\x2e\x5f\x6e\x75\x6d\x62\x65\x72\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x6c\x75\x65\x20\x3d\x20\x74\x6f\x4e\x75\x6d\x62\x65\x72\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x73\x65\x74\x50\x72\x6f\x70\x28\x63\x61\x6d\x65\x6c\x69\x7a\x65\x28\x6b\x65\x79\x29\x2c\x20\x76\x61\x6c\x75\x65\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x5f\x67\x65\x74\x50\x72\x6f\x70\x28\x6b\x65\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x2e\x5f\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x5f\x73\x65\x74\x50\x72\x6f\x70\x28\x6b\x65\x79\x2c\x20\x76\x61\x6c\x2c\x20\x73\x68\x6f\x75\x6c\x64\x52\x65\x66\x6c\x65\x63\x74\x20\x3d\x20\x74\x72\x75\x65\x2c\x20\x73\x68\x6f\x75\x6c\x64\x55\x70\x64\x61\x74\x65\x20\x3d\x20\x74\x72\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x20\x21\x3d\x3d\x20\x74\x68\x69\x73\x2e\x5f\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x70\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x76\x61\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x6f\x75\x6c\x64\x55\x70\x64\x61\x74\x65\x20\x26\x26\x20\x74\x68\x69\x73\x2e\x5f\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x75\x70\x64\x61\x74\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x73\x68\x6f\x75\x6c\x64\x52\x65\x66\x6c\x65\x63\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x20\x3d\x3d\x3d\x20\x74\x72\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x28\x6b\x65\x79\x29\x2c\x20\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x76\x61\x6c\x20\x3d\x3d\x3d\x20\x22\x73\x74\x72\x69\x6e\x67\x22\x20\x7c\x7c\x20\x74\x79\x70\x65\x6f\x66\x20\x76\x61\x6c\x20\x3d\x3d\x3d\x20\x22\x6e\x75\x6d\x62\x65\x72\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x28\x6b\x65\x79\x29\x2c\x20\x76\x61\x6c\x20\x2b\x20\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x76\x61\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x72\x65\x6d\x6f\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x28\x6b\x65\x79\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x5f\x75\x70\x64\x61\x74\x65\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x6e\x64\x65\x72\x28\x74\x68\x69\x73\x2e\x5f\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x29\x2c\x20\x74\x68\x69\x73\x2e\x73\x68\x61\x64\x6f\x77\x52\x6f\x6f\x74\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x5f\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x74\x68\x69\x73\x2e\x5f\x64\x65\x66\x2c\x20\x65\x78\x74\x65\x6e\x64\x28\x7b\x7d\x2c\x20\x74\x68\x69\x73\x2e\x5f\x70\x72\x6f\x70\x73\x29\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x74\x68\x69\x73\x2e\x5f\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x63\x65\x20\x3d\x20\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x5f\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x69\x73\x43\x45\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x65\x6d\x69\x74\x20\x3d\x20\x28\x65\x76\x65\x6e\x74\x2c\x20\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x64\x69\x73\x70\x61\x74\x63\x68\x45\x76\x65\x6e\x74\x28\x6e\x65\x77\x20\x43\x75\x73\x74\x6f\x6d\x45\x76\x65\x6e\x74\x28\x65\x76\x65\x6e\x74\x2c\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x74\x61\x69\x6c\x3a\x20\x61\x72\x67\x73\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x74\x68\x69\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x20\x26\x26\x20\x28\x70\x61\x72\x65\x6e\x74\x2e\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x20\x7c\x7c\x20\x70\x61\x72\x65\x6e\x74\x2e\x68\x6f\x73\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\x72\x65\x6e\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x6f\x66\x20\x56\x75\x65\x45\x6c\x65\x6d\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x61\x72\x65\x6e\x74\x20\x3d\x20\x70\x61\x72\x65\x6e\x74\x2e\x5f\x69\x6e\x73\x74\x61\x6e\x63\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x5f\x61\x70\x70\x6c\x79\x53\x74\x79\x6c\x65\x73\x28\x73\x74\x79\x6c\x65\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x74\x79\x6c\x65\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x73\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x63\x73\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x20\x3d\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x28\x22\x73\x74\x79\x6c\x65\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x2e\x74\x65\x78\x74\x43\x6f\x6e\x74\x65\x6e\x74\x20\x3d\x20\x63\x73\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x73\x68\x61\x64\x6f\x77\x52\x6f\x6f\x74\x2e\x61\x70\x70\x65\x6e\x64\x43\x68\x69\x6c\x64\x28\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x75\x73\x65\x43\x73\x73\x4d\x6f\x64\x75\x6c\x65\x28\x6e\x61\x6d\x65\x20\x3d\x20\x22\x24\x73\x74\x79\x6c\x65\x22\x29\x20\x7b\x0a\x20\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x64\x75\x6c\x65\x73\x20\x3d\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x74\x79\x70\x65\x2e\x5f\x5f\x63\x73\x73\x4d\x6f\x64\x75\x6c\x65\x73\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x6d\x6f\x64\x75\x6c\x65\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x64\x20\x3d\x20\x6d\x6f\x64\x75\x6c\x65\x73\x5b\x6e\x61\x6d\x65\x5d\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x6d\x6f\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x45\x4d\x50\x54\x59\x5f\x4f\x42\x4a\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6d\x6f\x64\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x75\x73\x65\x43\x73\x73\x56\x61\x72\x73\x28\x67\x65\x74\x74\x65\x72\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x74\x56\x61\x72\x73\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x73\x65\x74\x56\x61\x72\x73\x4f\x6e\x56\x4e\x6f\x64\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x2c\x20\x67\x65\x74\x74\x65\x72\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x70\x72\x6f\x78\x79\x29\x29\x3b\x0a\x20\x20\x77\x61\x74\x63\x68\x50\x6f\x73\x74\x45\x66\x66\x65\x63\x74\x28\x73\x65\x74\x56\x61\x72\x73\x29\x3b\x0a\x20\x20\x6f\x6e\x4d\x6f\x75\x6e\x74\x65\x64\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x62\x20\x3d\x20\x6e\x65\x77\x20\x4d\x75\x74\x61\x74\x69\x6f\x6e\x4f\x62\x73\x65\x72\x76\x65\x72\x28\x73\x65\x74\x56\x61\x72\x73\x29\x3b\x0a\x20\x20\x20\x20\x6f\x62\x2e\x6f\x62\x73\x65\x72\x76\x65\x28\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x73\x75\x62\x54\x72\x65\x65\x2e\x65\x6c\x2e\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x2c\x20\x7b\x20\x63\x68\x69\x6c\x64\x4c\x69\x73\x74\x3a\x20\x74\x72\x75\x65\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x6f\x6e\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x28\x28\x29\x20\x3d\x3e\x20\x6f\x62\x2e\x64\x69\x73\x63\x6f\x6e\x6e\x65\x63\x74\x28\x29\x29\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x56\x61\x72\x73\x4f\x6e\x56\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x2c\x20\x76\x61\x72\x73\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x32\x38\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x73\x75\x73\x70\x65\x6e\x73\x65\x3b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x70\x65\x6e\x64\x69\x6e\x67\x42\x72\x61\x6e\x63\x68\x20\x26\x26\x20\x21\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x69\x73\x48\x79\x64\x72\x61\x74\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x65\x66\x66\x65\x63\x74\x73\x2e\x70\x75\x73\x68\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x56\x61\x72\x73\x4f\x6e\x56\x4e\x6f\x64\x65\x28\x73\x75\x73\x70\x65\x6e\x73\x65\x2e\x61\x63\x74\x69\x76\x65\x42\x72\x61\x6e\x63\x68\x2c\x20\x76\x61\x72\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x73\x75\x62\x54\x72\x65\x65\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x73\x68\x61\x70\x65\x46\x6c\x61\x67\x20\x26\x20\x31\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x65\x74\x56\x61\x72\x73\x4f\x6e\x4e\x6f\x64\x65\x28\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x2c\x20\x76\x61\x72\x73\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x6e\x6f\x64\x65\x2e\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x63\x29\x20\x3d\x3e\x20\x73\x65\x74\x56\x61\x72\x73\x4f\x6e\x56\x4e\x6f\x64\x65\x28\x63\x2c\x20\x76\x61\x72\x73\x29\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x53\x74\x61\x74\x69\x63\x29\x20\x7b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x7b\x20\x65\x6c\x2c\x20\x61\x6e\x63\x68\x6f\x72\x20\x7d\x20\x3d\x20\x76\x6e\x6f\x64\x65\x3b\x0a\x20\x20\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x56\x61\x72\x73\x4f\x6e\x4e\x6f\x64\x65\x28\x65\x6c\x2c\x20\x76\x61\x72\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x6c\x20\x3d\x3d\x3d\x20\x61\x6e\x63\x68\x6f\x72\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x20\x3d\x20\x65\x6c\x2e\x6e\x65\x78\x74\x53\x69\x62\x6c\x69\x6e\x67\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x56\x61\x72\x73\x4f\x6e\x4e\x6f\x64\x65\x28\x65\x6c\x2c\x20\x76\x61\x72\x73\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x6e\x6f\x64\x65\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x74\x79\x6c\x65\x20\x3d\x20\x65\x6c\x2e\x73\x74\x79\x6c\x65\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x76\x61\x72\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x2e\x73\x65\x74\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x60\x2d\x2d\x24\x7b\x6b\x65\x79\x7d\x60\x2c\x20\x76\x61\x72\x73\x5b\x6b\x65\x79\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x54\x52\x41\x4e\x53\x49\x54\x49\x4f\x4e\x20\x3d\x20\x22\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x41\x4e\x49\x4d\x41\x54\x49\x4f\x4e\x20\x3d\x20\x22\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x3d\x20\x28\x70\x72\x6f\x70\x73\x2c\x20\x7b\x20\x73\x6c\x6f\x74\x73\x20\x7d\x29\x20\x3d\x3e\x20\x68\x28\x42\x61\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2c\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x28\x70\x72\x6f\x70\x73\x29\x2c\x20\x73\x6c\x6f\x74\x73\x29\x3b\x0a\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x64\x69\x73\x70\x6c\x61\x79\x4e\x61\x6d\x65\x20\x3d\x20\x22\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x22\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x44\x4f\x4d\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x73\x20\x3d\x20\x7b\x0a\x20\x20\x6e\x61\x6d\x65\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x74\x79\x70\x65\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x63\x73\x73\x3a\x20\x7b\x0a\x20\x20\x20\x20\x74\x79\x70\x65\x3a\x20\x42\x6f\x6f\x6c\x65\x61\x6e\x2c\x0a\x20\x20\x20\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x20\x74\x72\x75\x65\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x64\x75\x72\x61\x74\x69\x6f\x6e\x3a\x20\x5b\x53\x74\x72\x69\x6e\x67\x2c\x20\x4e\x75\x6d\x62\x65\x72\x2c\x20\x4f\x62\x6a\x65\x63\x74\x5d\x2c\x0a\x20\x20\x65\x6e\x74\x65\x72\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x65\x6e\x74\x65\x72\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x65\x6e\x74\x65\x72\x54\x6f\x43\x6c\x61\x73\x73\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x61\x70\x70\x65\x61\x72\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x61\x70\x70\x65\x61\x72\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x61\x70\x70\x65\x61\x72\x54\x6f\x43\x6c\x61\x73\x73\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x6c\x65\x61\x76\x65\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x6c\x65\x61\x76\x65\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x6c\x65\x61\x76\x65\x54\x6f\x43\x6c\x61\x73\x73\x3a\x20\x53\x74\x72\x69\x6e\x67\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x73\x20\x3d\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x70\x72\x6f\x70\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x65\x78\x74\x65\x6e\x64\x28\x7b\x7d\x2c\x20\x42\x61\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x70\x72\x6f\x70\x73\x2c\x20\x44\x4f\x4d\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x73\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x20\x3d\x20\x28\x68\x6f\x6f\x6b\x2c\x20\x61\x72\x67\x73\x20\x3d\x20\x5b\x5d\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x68\x6f\x6f\x6b\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x68\x6f\x6f\x6b\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x68\x32\x29\x20\x3d\x3e\x20\x68\x32\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x68\x6f\x6f\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x68\x6f\x6f\x6b\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x68\x61\x73\x45\x78\x70\x6c\x69\x63\x69\x74\x43\x61\x6c\x6c\x62\x61\x63\x6b\x20\x3d\x20\x28\x68\x6f\x6f\x6b\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x6f\x6f\x6b\x20\x3f\x20\x69\x73\x41\x72\x72\x61\x79\x28\x68\x6f\x6f\x6b\x29\x20\x3f\x20\x68\x6f\x6f\x6b\x2e\x73\x6f\x6d\x65\x28\x28\x68\x32\x29\x20\x3d\x3e\x20\x68\x32\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x31\x29\x20\x3a\x20\x68\x6f\x6f\x6b\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x31\x20\x3a\x20\x66\x61\x6c\x73\x65\x3b\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x28\x72\x61\x77\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x62\x61\x73\x65\x50\x72\x6f\x70\x73\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x66\x6f\x72\x20\x28\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x69\x6e\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x28\x6b\x65\x79\x20\x69\x6e\x20\x44\x4f\x4d\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x62\x61\x73\x65\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x20\x3d\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x5b\x6b\x65\x79\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x72\x61\x77\x50\x72\x6f\x70\x73\x2e\x63\x73\x73\x20\x3d\x3d\x3d\x20\x66\x61\x6c\x73\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x62\x61\x73\x65\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6e\x61\x6d\x65\x20\x3d\x20\x22\x76\x22\x2c\x20\x74\x79\x70\x65\x2c\x20\x64\x75\x72\x61\x74\x69\x6f\x6e\x2c\x20\x65\x6e\x74\x65\x72\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x20\x3d\x20\x60\x24\x7b\x6e\x61\x6d\x65\x7d\x2d\x65\x6e\x74\x65\x72\x2d\x66\x72\x6f\x6d\x60\x2c\x20\x65\x6e\x74\x65\x72\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x20\x3d\x20\x60\x24\x7b\x6e\x61\x6d\x65\x7d\x2d\x65\x6e\x74\x65\x72\x2d\x61\x63\x74\x69\x76\x65\x60\x2c\x20\x65\x6e\x74\x65\x72\x54\x6f\x43\x6c\x61\x73\x73\x20\x3d\x20\x60\x24\x7b\x6e\x61\x6d\x65\x7d\x2d\x65\x6e\x74\x65\x72\x2d\x74\x6f\x60\x2c\x20\x61\x70\x70\x65\x61\x72\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x20\x3d\x20\x65\x6e\x74\x65\x72\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x2c\x20\x61\x70\x70\x65\x61\x72\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x20\x3d\x20\x65\x6e\x74\x65\x72\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x2c\x20\x61\x70\x70\x65\x61\x72\x54\x6f\x43\x6c\x61\x73\x73\x20\x3d\x20\x65\x6e\x74\x65\x72\x54\x6f\x43\x6c\x61\x73\x73\x2c\x20\x6c\x65\x61\x76\x65\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x20\x3d\x20\x60\x24\x7b\x6e\x61\x6d\x65\x7d\x2d\x6c\x65\x61\x76\x65\x2d\x66\x72\x6f\x6d\x60\x2c\x20\x6c\x65\x61\x76\x65\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x20\x3d\x20\x60\x24\x7b\x6e\x61\x6d\x65\x7d\x2d\x6c\x65\x61\x76\x65\x2d\x61\x63\x74\x69\x76\x65\x60\x2c\x20\x6c\x65\x61\x76\x65\x54\x6f\x43\x6c\x61\x73\x73\x20\x3d\x20\x60\x24\x7b\x6e\x61\x6d\x65\x7d\x2d\x6c\x65\x61\x76\x65\x2d\x74\x6f\x60\x20\x7d\x20\x3d\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x75\x72\x61\x74\x69\x6f\x6e\x73\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x44\x75\x72\x61\x74\x69\x6f\x6e\x28\x64\x75\x72\x61\x74\x69\x6f\x6e\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6e\x74\x65\x72\x44\x75\x72\x61\x74\x69\x6f\x6e\x20\x3d\x20\x64\x75\x72\x61\x74\x69\x6f\x6e\x73\x20\x26\x26\x20\x64\x75\x72\x61\x74\x69\x6f\x6e\x73\x5b\x30\x5d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6c\x65\x61\x76\x65\x44\x75\x72\x61\x74\x69\x6f\x6e\x20\x3d\x20\x64\x75\x72\x61\x74\x69\x6f\x6e\x73\x20\x26\x26\x20\x64\x75\x72\x61\x74\x69\x6f\x6e\x73\x5b\x31\x5d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x2c\x20\x6f\x6e\x45\x6e\x74\x65\x72\x2c\x20\x6f\x6e\x45\x6e\x74\x65\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x2c\x20\x6f\x6e\x4c\x65\x61\x76\x65\x2c\x20\x6f\x6e\x4c\x65\x61\x76\x65\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x2c\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x41\x70\x70\x65\x61\x72\x20\x3d\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x2c\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x20\x3d\x20\x6f\x6e\x45\x6e\x74\x65\x72\x2c\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x20\x3d\x20\x6f\x6e\x45\x6e\x74\x65\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x20\x7d\x20\x3d\x20\x62\x61\x73\x65\x50\x72\x6f\x70\x73\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x69\x6e\x69\x73\x68\x45\x6e\x74\x65\x72\x20\x3d\x20\x28\x65\x6c\x2c\x20\x69\x73\x41\x70\x70\x65\x61\x72\x2c\x20\x64\x6f\x6e\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x69\x73\x41\x70\x70\x65\x61\x72\x20\x3f\x20\x61\x70\x70\x65\x61\x72\x54\x6f\x43\x6c\x61\x73\x73\x20\x3a\x20\x65\x6e\x74\x65\x72\x54\x6f\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x69\x73\x41\x70\x70\x65\x61\x72\x20\x3f\x20\x61\x70\x70\x65\x61\x72\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x20\x3a\x20\x65\x6e\x74\x65\x72\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x64\x6f\x6e\x65\x20\x26\x26\x20\x64\x6f\x6e\x65\x28\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x69\x6e\x69\x73\x68\x4c\x65\x61\x76\x65\x20\x3d\x20\x28\x65\x6c\x2c\x20\x64\x6f\x6e\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x69\x73\x4c\x65\x61\x76\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x6c\x65\x61\x76\x65\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x6c\x65\x61\x76\x65\x54\x6f\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x6c\x65\x61\x76\x65\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x64\x6f\x6e\x65\x20\x26\x26\x20\x64\x6f\x6e\x65\x28\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x61\x6b\x65\x45\x6e\x74\x65\x72\x48\x6f\x6f\x6b\x20\x3d\x20\x28\x69\x73\x41\x70\x70\x65\x61\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x65\x6c\x2c\x20\x64\x6f\x6e\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x6f\x6f\x6b\x20\x3d\x20\x69\x73\x41\x70\x70\x65\x61\x72\x20\x3f\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x20\x3a\x20\x6f\x6e\x45\x6e\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x66\x69\x6e\x69\x73\x68\x45\x6e\x74\x65\x72\x28\x65\x6c\x2c\x20\x69\x73\x41\x70\x70\x65\x61\x72\x2c\x20\x64\x6f\x6e\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x28\x68\x6f\x6f\x6b\x2c\x20\x5b\x65\x6c\x2c\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x46\x72\x61\x6d\x65\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x69\x73\x41\x70\x70\x65\x61\x72\x20\x3f\x20\x61\x70\x70\x65\x61\x72\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x20\x3a\x20\x65\x6e\x74\x65\x72\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x64\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x69\x73\x41\x70\x70\x65\x61\x72\x20\x3f\x20\x61\x70\x70\x65\x61\x72\x54\x6f\x43\x6c\x61\x73\x73\x20\x3a\x20\x65\x6e\x74\x65\x72\x54\x6f\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x68\x61\x73\x45\x78\x70\x6c\x69\x63\x69\x74\x43\x61\x6c\x6c\x62\x61\x63\x6b\x28\x68\x6f\x6f\x6b\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x77\x68\x65\x6e\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x45\x6e\x64\x73\x28\x65\x6c\x2c\x20\x74\x79\x70\x65\x2c\x20\x65\x6e\x74\x65\x72\x44\x75\x72\x61\x74\x69\x6f\x6e\x2c\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x78\x74\x65\x6e\x64\x28\x62\x61\x73\x65\x50\x72\x6f\x70\x73\x2c\x20\x7b\x0a\x20\x20\x20\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x28\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x28\x6f\x6e\x42\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x65\x6e\x74\x65\x72\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x65\x6e\x74\x65\x72\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x41\x70\x70\x65\x61\x72\x28\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x28\x6f\x6e\x42\x65\x66\x6f\x72\x65\x41\x70\x70\x65\x61\x72\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x61\x70\x70\x65\x61\x72\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x61\x70\x70\x65\x61\x72\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x45\x6e\x74\x65\x72\x3a\x20\x6d\x61\x6b\x65\x45\x6e\x74\x65\x72\x48\x6f\x6f\x6b\x28\x66\x61\x6c\x73\x65\x29\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x3a\x20\x6d\x61\x6b\x65\x45\x6e\x74\x65\x72\x48\x6f\x6f\x6b\x28\x74\x72\x75\x65\x29\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x4c\x65\x61\x76\x65\x28\x65\x6c\x2c\x20\x64\x6f\x6e\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x69\x73\x4c\x65\x61\x76\x69\x6e\x67\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x66\x69\x6e\x69\x73\x68\x4c\x65\x61\x76\x65\x28\x65\x6c\x2c\x20\x64\x6f\x6e\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x6c\x65\x61\x76\x65\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x63\x65\x52\x65\x66\x6c\x6f\x77\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x6c\x65\x61\x76\x65\x41\x63\x74\x69\x76\x65\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x78\x74\x46\x72\x61\x6d\x65\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x65\x6c\x2e\x5f\x69\x73\x4c\x65\x61\x76\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x6c\x65\x61\x76\x65\x46\x72\x6f\x6d\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x64\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x6c\x65\x61\x76\x65\x54\x6f\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x68\x61\x73\x45\x78\x70\x6c\x69\x63\x69\x74\x43\x61\x6c\x6c\x62\x61\x63\x6b\x28\x6f\x6e\x4c\x65\x61\x76\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x77\x68\x65\x6e\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x45\x6e\x64\x73\x28\x65\x6c\x2c\x20\x74\x79\x70\x65\x2c\x20\x6c\x65\x61\x76\x65\x44\x75\x72\x61\x74\x69\x6f\x6e\x2c\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x28\x6f\x6e\x4c\x65\x61\x76\x65\x2c\x20\x5b\x65\x6c\x2c\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x45\x6e\x74\x65\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x28\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x69\x6e\x69\x73\x68\x45\x6e\x74\x65\x72\x28\x65\x6c\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x28\x6f\x6e\x45\x6e\x74\x65\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x41\x70\x70\x65\x61\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x28\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x69\x6e\x69\x73\x68\x45\x6e\x74\x65\x72\x28\x65\x6c\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x28\x6f\x6e\x41\x70\x70\x65\x61\x72\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x2c\x0a\x20\x20\x20\x20\x6f\x6e\x4c\x65\x61\x76\x65\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x28\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x69\x6e\x69\x73\x68\x4c\x65\x61\x76\x65\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x61\x6c\x6c\x48\x6f\x6f\x6b\x28\x6f\x6e\x4c\x65\x61\x76\x65\x43\x61\x6e\x63\x65\x6c\x6c\x65\x64\x2c\x20\x5b\x65\x6c\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x44\x75\x72\x61\x74\x69\x6f\x6e\x28\x64\x75\x72\x61\x74\x69\x6f\x6e\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x64\x75\x72\x61\x74\x69\x6f\x6e\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x64\x75\x72\x61\x74\x69\x6f\x6e\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5b\x4e\x75\x6d\x62\x65\x72\x4f\x66\x28\x64\x75\x72\x61\x74\x69\x6f\x6e\x2e\x65\x6e\x74\x65\x72\x29\x2c\x20\x4e\x75\x6d\x62\x65\x72\x4f\x66\x28\x64\x75\x72\x61\x74\x69\x6f\x6e\x2e\x6c\x65\x61\x76\x65\x29\x5d\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x20\x3d\x20\x4e\x75\x6d\x62\x65\x72\x4f\x66\x28\x64\x75\x72\x61\x74\x69\x6f\x6e\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x5b\x6e\x2c\x20\x6e\x5d\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x4e\x75\x6d\x62\x65\x72\x4f\x66\x28\x76\x61\x6c\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x74\x6f\x4e\x75\x6d\x62\x65\x72\x28\x76\x61\x6c\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x61\x64\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x63\x6c\x73\x29\x20\x7b\x0a\x20\x20\x63\x6c\x73\x2e\x73\x70\x6c\x69\x74\x28\x2f\x5c\x73\x2b\x2f\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x63\x29\x20\x3d\x3e\x20\x63\x20\x26\x26\x20\x65\x6c\x2e\x63\x6c\x61\x73\x73\x4c\x69\x73\x74\x2e\x61\x64\x64\x28\x63\x29\x29\x3b\x0a\x20\x20\x28\x65\x6c\x2e\x5f\x76\x74\x63\x20\x7c\x7c\x20\x28\x65\x6c\x2e\x5f\x76\x74\x63\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x53\x65\x74\x28\x29\x29\x29\x2e\x61\x64\x64\x28\x63\x6c\x73\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x6d\x6f\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x63\x6c\x73\x29\x20\x7b\x0a\x20\x20\x63\x6c\x73\x2e\x73\x70\x6c\x69\x74\x28\x2f\x5c\x73\x2b\x2f\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x63\x29\x20\x3d\x3e\x20\x63\x20\x26\x26\x20\x65\x6c\x2e\x63\x6c\x61\x73\x73\x4c\x69\x73\x74\x2e\x72\x65\x6d\x6f\x76\x65\x28\x63\x29\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x5f\x76\x74\x63\x20\x7d\x20\x3d\x20\x65\x6c\x3b\x0a\x20\x20\x69\x66\x20\x28\x5f\x76\x74\x63\x29\x20\x7b\x0a\x20\x20\x20\x20\x5f\x76\x74\x63\x2e\x64\x65\x6c\x65\x74\x65\x28\x63\x6c\x73\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x5f\x76\x74\x63\x2e\x73\x69\x7a\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x76\x74\x63\x20\x3d\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x65\x78\x74\x46\x72\x61\x6d\x65\x28\x63\x62\x29\x20\x7b\x0a\x20\x20\x72\x65\x71\x75\x65\x73\x74\x41\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x46\x72\x61\x6d\x65\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x71\x75\x65\x73\x74\x41\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x46\x72\x61\x6d\x65\x28\x63\x62\x29\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x7d\x0a\x6c\x65\x74\x20\x65\x6e\x64\x49\x64\x20\x3d\x20\x30\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x77\x68\x65\x6e\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x45\x6e\x64\x73\x28\x65\x6c\x2c\x20\x65\x78\x70\x65\x63\x74\x65\x64\x54\x79\x70\x65\x2c\x20\x65\x78\x70\x6c\x69\x63\x69\x74\x54\x69\x6d\x65\x6f\x75\x74\x2c\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x64\x20\x3d\x20\x65\x6c\x2e\x5f\x65\x6e\x64\x49\x64\x20\x3d\x20\x2b\x2b\x65\x6e\x64\x49\x64\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x6f\x6c\x76\x65\x49\x66\x4e\x6f\x74\x53\x74\x61\x6c\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x64\x20\x3d\x3d\x3d\x20\x65\x6c\x2e\x5f\x65\x6e\x64\x49\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x69\x66\x20\x28\x65\x78\x70\x6c\x69\x63\x69\x74\x54\x69\x6d\x65\x6f\x75\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x65\x74\x54\x69\x6d\x65\x6f\x75\x74\x28\x72\x65\x73\x6f\x6c\x76\x65\x49\x66\x4e\x6f\x74\x53\x74\x61\x6c\x65\x2c\x20\x65\x78\x70\x6c\x69\x63\x69\x74\x54\x69\x6d\x65\x6f\x75\x74\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x74\x79\x70\x65\x2c\x20\x74\x69\x6d\x65\x6f\x75\x74\x2c\x20\x70\x72\x6f\x70\x43\x6f\x75\x6e\x74\x20\x7d\x20\x3d\x20\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x49\x6e\x66\x6f\x28\x65\x6c\x2c\x20\x65\x78\x70\x65\x63\x74\x65\x64\x54\x79\x70\x65\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x21\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x32\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6e\x64\x45\x76\x65\x6e\x74\x20\x3d\x20\x74\x79\x70\x65\x20\x2b\x20\x22\x65\x6e\x64\x22\x3b\x0a\x20\x20\x6c\x65\x74\x20\x65\x6e\x64\x65\x64\x20\x3d\x20\x30\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6e\x64\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x72\x65\x6d\x6f\x76\x65\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6e\x64\x45\x76\x65\x6e\x74\x2c\x20\x6f\x6e\x45\x6e\x64\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x49\x66\x4e\x6f\x74\x53\x74\x61\x6c\x65\x28\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6e\x45\x6e\x64\x20\x3d\x20\x28\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x65\x2e\x74\x61\x72\x67\x65\x74\x20\x3d\x3d\x3d\x20\x65\x6c\x20\x26\x26\x20\x2b\x2b\x65\x6e\x64\x65\x64\x20\x3e\x3d\x20\x70\x72\x6f\x70\x43\x6f\x75\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6e\x64\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x73\x65\x74\x54\x69\x6d\x65\x6f\x75\x74\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x65\x6e\x64\x65\x64\x20\x3c\x20\x70\x72\x6f\x70\x43\x6f\x75\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6e\x64\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x2c\x20\x74\x69\x6d\x65\x6f\x75\x74\x20\x2b\x20\x31\x29\x3b\x0a\x20\x20\x65\x6c\x2e\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6e\x64\x45\x76\x65\x6e\x74\x2c\x20\x6f\x6e\x45\x6e\x64\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x49\x6e\x66\x6f\x28\x65\x6c\x2c\x20\x65\x78\x70\x65\x63\x74\x65\x64\x54\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x74\x79\x6c\x65\x73\x20\x3d\x20\x77\x69\x6e\x64\x6f\x77\x2e\x67\x65\x74\x43\x6f\x6d\x70\x75\x74\x65\x64\x53\x74\x79\x6c\x65\x28\x65\x6c\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x53\x74\x79\x6c\x65\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x20\x3d\x20\x28\x6b\x65\x79\x29\x20\x3d\x3e\x20\x28\x73\x74\x79\x6c\x65\x73\x5b\x6b\x65\x79\x5d\x20\x7c\x7c\x20\x22\x22\x29\x2e\x73\x70\x6c\x69\x74\x28\x22\x2c\x20\x22\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x44\x65\x6c\x61\x79\x73\x20\x3d\x20\x67\x65\x74\x53\x74\x79\x6c\x65\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x28\x54\x52\x41\x4e\x53\x49\x54\x49\x4f\x4e\x20\x2b\x20\x22\x44\x65\x6c\x61\x79\x22\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x44\x75\x72\x61\x74\x69\x6f\x6e\x73\x20\x3d\x20\x67\x65\x74\x53\x74\x79\x6c\x65\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x28\x54\x52\x41\x4e\x53\x49\x54\x49\x4f\x4e\x20\x2b\x20\x22\x44\x75\x72\x61\x74\x69\x6f\x6e\x22\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x54\x69\x6d\x65\x6f\x75\x74\x20\x3d\x20\x67\x65\x74\x54\x69\x6d\x65\x6f\x75\x74\x28\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x44\x65\x6c\x61\x79\x73\x2c\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x44\x75\x72\x61\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x44\x65\x6c\x61\x79\x73\x20\x3d\x20\x67\x65\x74\x53\x74\x79\x6c\x65\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x28\x41\x4e\x49\x4d\x41\x54\x49\x4f\x4e\x20\x2b\x20\x22\x44\x65\x6c\x61\x79\x22\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x44\x75\x72\x61\x74\x69\x6f\x6e\x73\x20\x3d\x20\x67\x65\x74\x53\x74\x79\x6c\x65\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x28\x41\x4e\x49\x4d\x41\x54\x49\x4f\x4e\x20\x2b\x20\x22\x44\x75\x72\x61\x74\x69\x6f\x6e\x22\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x54\x69\x6d\x65\x6f\x75\x74\x20\x3d\x20\x67\x65\x74\x54\x69\x6d\x65\x6f\x75\x74\x28\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x44\x65\x6c\x61\x79\x73\x2c\x20\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x44\x75\x72\x61\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x6c\x65\x74\x20\x74\x79\x70\x65\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x6c\x65\x74\x20\x74\x69\x6d\x65\x6f\x75\x74\x20\x3d\x20\x30\x3b\x0a\x20\x20\x6c\x65\x74\x20\x70\x72\x6f\x70\x43\x6f\x75\x6e\x74\x20\x3d\x20\x30\x3b\x0a\x20\x20\x69\x66\x20\x28\x65\x78\x70\x65\x63\x74\x65\x64\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x54\x52\x41\x4e\x53\x49\x54\x49\x4f\x4e\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x54\x69\x6d\x65\x6f\x75\x74\x20\x3e\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x20\x3d\x20\x54\x52\x41\x4e\x53\x49\x54\x49\x4f\x4e\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x69\x6d\x65\x6f\x75\x74\x20\x3d\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x54\x69\x6d\x65\x6f\x75\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x43\x6f\x75\x6e\x74\x20\x3d\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x44\x75\x72\x61\x74\x69\x6f\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x65\x78\x70\x65\x63\x74\x65\x64\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x41\x4e\x49\x4d\x41\x54\x49\x4f\x4e\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x54\x69\x6d\x65\x6f\x75\x74\x20\x3e\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x20\x3d\x20\x41\x4e\x49\x4d\x41\x54\x49\x4f\x4e\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x69\x6d\x65\x6f\x75\x74\x20\x3d\x20\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x54\x69\x6d\x65\x6f\x75\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x6f\x70\x43\x6f\x75\x6e\x74\x20\x3d\x20\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x44\x75\x72\x61\x74\x69\x6f\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x74\x69\x6d\x65\x6f\x75\x74\x20\x3d\x20\x4d\x61\x74\x68\x2e\x6d\x61\x78\x28\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x54\x69\x6d\x65\x6f\x75\x74\x2c\x20\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x54\x69\x6d\x65\x6f\x75\x74\x29\x3b\x0a\x20\x20\x20\x20\x74\x79\x70\x65\x20\x3d\x20\x74\x69\x6d\x65\x6f\x75\x74\x20\x3e\x20\x30\x20\x3f\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x54\x69\x6d\x65\x6f\x75\x74\x20\x3e\x20\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x54\x69\x6d\x65\x6f\x75\x74\x20\x3f\x20\x54\x52\x41\x4e\x53\x49\x54\x49\x4f\x4e\x20\x3a\x20\x41\x4e\x49\x4d\x41\x54\x49\x4f\x4e\x20\x3a\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x43\x6f\x75\x6e\x74\x20\x3d\x20\x74\x79\x70\x65\x20\x3f\x20\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x54\x52\x41\x4e\x53\x49\x54\x49\x4f\x4e\x20\x3f\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x44\x75\x72\x61\x74\x69\x6f\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3a\x20\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x44\x75\x72\x61\x74\x69\x6f\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3a\x20\x30\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x68\x61\x73\x54\x72\x61\x6e\x73\x66\x6f\x72\x6d\x20\x3d\x20\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x54\x52\x41\x4e\x53\x49\x54\x49\x4f\x4e\x20\x26\x26\x20\x2f\x5c\x62\x28\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x7c\x61\x6c\x6c\x29\x28\x2c\x7c\x24\x29\x2f\x2e\x74\x65\x73\x74\x28\x73\x74\x79\x6c\x65\x73\x5b\x54\x52\x41\x4e\x53\x49\x54\x49\x4f\x4e\x20\x2b\x20\x22\x50\x72\x6f\x70\x65\x72\x74\x79\x22\x5d\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x0a\x20\x20\x20\x20\x74\x79\x70\x65\x2c\x0a\x20\x20\x20\x20\x74\x69\x6d\x65\x6f\x75\x74\x2c\x0a\x20\x20\x20\x20\x70\x72\x6f\x70\x43\x6f\x75\x6e\x74\x2c\x0a\x20\x20\x20\x20\x68\x61\x73\x54\x72\x61\x6e\x73\x66\x6f\x72\x6d\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x54\x69\x6d\x65\x6f\x75\x74\x28\x64\x65\x6c\x61\x79\x73\x2c\x20\x64\x75\x72\x61\x74\x69\x6f\x6e\x73\x29\x20\x7b\x0a\x20\x20\x77\x68\x69\x6c\x65\x20\x28\x64\x65\x6c\x61\x79\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3c\x20\x64\x75\x72\x61\x74\x69\x6f\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x64\x65\x6c\x61\x79\x73\x20\x3d\x20\x64\x65\x6c\x61\x79\x73\x2e\x63\x6f\x6e\x63\x61\x74\x28\x64\x65\x6c\x61\x79\x73\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x4d\x61\x74\x68\x2e\x6d\x61\x78\x28\x2e\x2e\x2e\x64\x75\x72\x61\x74\x69\x6f\x6e\x73\x2e\x6d\x61\x70\x28\x28\x64\x2c\x20\x69\x29\x20\x3d\x3e\x20\x74\x6f\x4d\x73\x28\x64\x29\x20\x2b\x20\x74\x6f\x4d\x73\x28\x64\x65\x6c\x61\x79\x73\x5b\x69\x5d\x29\x29\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x6f\x4d\x73\x28\x73\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x4e\x75\x6d\x62\x65\x72\x28\x73\x2e\x73\x6c\x69\x63\x65\x28\x30\x2c\x20\x2d\x31\x29\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x22\x2c\x22\x2c\x20\x22\x2e\x22\x29\x29\x20\x2a\x20\x31\x65\x33\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6f\x72\x63\x65\x52\x65\x66\x6c\x6f\x77\x28\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x62\x6f\x64\x79\x2e\x6f\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x70\x6f\x73\x69\x74\x69\x6f\x6e\x4d\x61\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x57\x65\x61\x6b\x4d\x61\x70\x28\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x50\x6f\x73\x69\x74\x69\x6f\x6e\x4d\x61\x70\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x6e\x65\x77\x20\x57\x65\x61\x6b\x4d\x61\x70\x28\x29\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x47\x72\x6f\x75\x70\x49\x6d\x70\x6c\x20\x3d\x20\x7b\x0a\x20\x20\x6e\x61\x6d\x65\x3a\x20\x22\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x47\x72\x6f\x75\x70\x22\x2c\x0a\x20\x20\x70\x72\x6f\x70\x73\x3a\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x65\x78\x74\x65\x6e\x64\x28\x7b\x7d\x2c\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x73\x2c\x20\x7b\x0a\x20\x20\x20\x20\x74\x61\x67\x3a\x20\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x20\x20\x6d\x6f\x76\x65\x43\x6c\x61\x73\x73\x3a\x20\x53\x74\x72\x69\x6e\x67\x0a\x20\x20\x7d\x29\x2c\x0a\x20\x20\x73\x65\x74\x75\x70\x28\x70\x72\x6f\x70\x73\x2c\x20\x7b\x20\x73\x6c\x6f\x74\x73\x20\x7d\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x20\x3d\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x74\x61\x74\x65\x20\x3d\x20\x75\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x53\x74\x61\x74\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x6c\x65\x74\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x6f\x6e\x55\x70\x64\x61\x74\x65\x64\x28\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x76\x65\x43\x6c\x61\x73\x73\x20\x3d\x20\x70\x72\x6f\x70\x73\x2e\x6d\x6f\x76\x65\x43\x6c\x61\x73\x73\x20\x7c\x7c\x20\x60\x24\x7b\x70\x72\x6f\x70\x73\x2e\x6e\x61\x6d\x65\x20\x7c\x7c\x20\x22\x76\x22\x7d\x2d\x6d\x6f\x76\x65\x60\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x68\x61\x73\x43\x53\x53\x54\x72\x61\x6e\x73\x66\x6f\x72\x6d\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x5b\x30\x5d\x2e\x65\x6c\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x76\x6e\x6f\x64\x65\x2e\x65\x6c\x2c\x20\x6d\x6f\x76\x65\x43\x6c\x61\x73\x73\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x63\x61\x6c\x6c\x50\x65\x6e\x64\x69\x6e\x67\x43\x62\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x72\x65\x63\x6f\x72\x64\x50\x6f\x73\x69\x74\x69\x6f\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x76\x65\x64\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x2e\x66\x69\x6c\x74\x65\x72\x28\x61\x70\x70\x6c\x79\x54\x72\x61\x6e\x73\x6c\x61\x74\x69\x6f\x6e\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x63\x65\x52\x65\x66\x6c\x6f\x77\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6d\x6f\x76\x65\x64\x43\x68\x69\x6c\x64\x72\x65\x6e\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x63\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6c\x20\x3d\x20\x63\x2e\x65\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x74\x79\x6c\x65\x20\x3d\x20\x65\x6c\x2e\x73\x74\x79\x6c\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x64\x64\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x6d\x6f\x76\x65\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x2e\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x20\x3d\x20\x73\x74\x79\x6c\x65\x2e\x77\x65\x62\x6b\x69\x74\x54\x72\x61\x6e\x73\x66\x6f\x72\x6d\x20\x3d\x20\x73\x74\x79\x6c\x65\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x44\x75\x72\x61\x74\x69\x6f\x6e\x20\x3d\x20\x22\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x62\x20\x3d\x20\x65\x6c\x2e\x5f\x6d\x6f\x76\x65\x43\x62\x20\x3d\x20\x28\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x20\x26\x26\x20\x65\x2e\x74\x61\x72\x67\x65\x74\x20\x21\x3d\x3d\x20\x65\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x65\x20\x7c\x7c\x20\x2f\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x24\x2f\x2e\x74\x65\x73\x74\x28\x65\x2e\x70\x72\x6f\x70\x65\x72\x74\x79\x4e\x61\x6d\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x72\x65\x6d\x6f\x76\x65\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x22\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x65\x6e\x64\x22\x2c\x20\x63\x62\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x6d\x6f\x76\x65\x43\x62\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x6d\x6f\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x43\x6c\x61\x73\x73\x28\x65\x6c\x2c\x20\x6d\x6f\x76\x65\x43\x6c\x61\x73\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x22\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x65\x6e\x64\x22\x2c\x20\x63\x62\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x20\x3d\x20\x74\x6f\x52\x61\x77\x28\x70\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x73\x73\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x28\x72\x61\x77\x50\x72\x6f\x70\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x74\x61\x67\x20\x3d\x20\x72\x61\x77\x50\x72\x6f\x70\x73\x2e\x74\x61\x67\x20\x7c\x7c\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x20\x3d\x20\x73\x6c\x6f\x74\x73\x2e\x64\x65\x66\x61\x75\x6c\x74\x20\x3f\x20\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x52\x61\x77\x43\x68\x69\x6c\x64\x72\x65\x6e\x28\x73\x6c\x6f\x74\x73\x2e\x64\x65\x66\x61\x75\x6c\x74\x28\x29\x29\x20\x3a\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x69\x6c\x64\x20\x3d\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x69\x6c\x64\x2e\x6b\x65\x79\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x63\x68\x69\x6c\x64\x2c\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x63\x68\x69\x6c\x64\x2c\x20\x63\x73\x73\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x2c\x20\x73\x74\x61\x74\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x69\x6c\x64\x20\x3d\x20\x70\x72\x65\x76\x43\x68\x69\x6c\x64\x72\x65\x6e\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x63\x68\x69\x6c\x64\x2c\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x28\x63\x68\x69\x6c\x64\x2c\x20\x63\x73\x73\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x50\x72\x6f\x70\x73\x2c\x20\x73\x74\x61\x74\x65\x2c\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x6f\x73\x69\x74\x69\x6f\x6e\x4d\x61\x70\x2e\x73\x65\x74\x28\x63\x68\x69\x6c\x64\x2c\x20\x63\x68\x69\x6c\x64\x2e\x65\x6c\x2e\x67\x65\x74\x42\x6f\x75\x6e\x64\x69\x6e\x67\x43\x6c\x69\x65\x6e\x74\x52\x65\x63\x74\x28\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x28\x74\x61\x67\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x63\x68\x69\x6c\x64\x72\x65\x6e\x29\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x47\x72\x6f\x75\x70\x20\x3d\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x47\x72\x6f\x75\x70\x49\x6d\x70\x6c\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x61\x6c\x6c\x50\x65\x6e\x64\x69\x6e\x67\x43\x62\x73\x28\x63\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6c\x20\x3d\x20\x63\x2e\x65\x6c\x3b\x0a\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x5f\x6d\x6f\x76\x65\x43\x62\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x6d\x6f\x76\x65\x43\x62\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x5f\x65\x6e\x74\x65\x72\x43\x62\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x65\x6e\x74\x65\x72\x43\x62\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x63\x6f\x72\x64\x50\x6f\x73\x69\x74\x69\x6f\x6e\x28\x63\x29\x20\x7b\x0a\x20\x20\x6e\x65\x77\x50\x6f\x73\x69\x74\x69\x6f\x6e\x4d\x61\x70\x2e\x73\x65\x74\x28\x63\x2c\x20\x63\x2e\x65\x6c\x2e\x67\x65\x74\x42\x6f\x75\x6e\x64\x69\x6e\x67\x43\x6c\x69\x65\x6e\x74\x52\x65\x63\x74\x28\x29\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x61\x70\x70\x6c\x79\x54\x72\x61\x6e\x73\x6c\x61\x74\x69\x6f\x6e\x28\x63\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x6c\x64\x50\x6f\x73\x20\x3d\x20\x70\x6f\x73\x69\x74\x69\x6f\x6e\x4d\x61\x70\x2e\x67\x65\x74\x28\x63\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x50\x6f\x73\x20\x3d\x20\x6e\x65\x77\x50\x6f\x73\x69\x74\x69\x6f\x6e\x4d\x61\x70\x2e\x67\x65\x74\x28\x63\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x78\x20\x3d\x20\x6f\x6c\x64\x50\x6f\x73\x2e\x6c\x65\x66\x74\x20\x2d\x20\x6e\x65\x77\x50\x6f\x73\x2e\x6c\x65\x66\x74\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x64\x79\x20\x3d\x20\x6f\x6c\x64\x50\x6f\x73\x2e\x74\x6f\x70\x20\x2d\x20\x6e\x65\x77\x50\x6f\x73\x2e\x74\x6f\x70\x3b\x0a\x20\x20\x69\x66\x20\x28\x64\x78\x20\x7c\x7c\x20\x64\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x20\x3d\x20\x63\x2e\x65\x6c\x2e\x73\x74\x79\x6c\x65\x3b\x0a\x20\x20\x20\x20\x73\x2e\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x20\x3d\x20\x73\x2e\x77\x65\x62\x6b\x69\x74\x54\x72\x61\x6e\x73\x66\x6f\x72\x6d\x20\x3d\x20\x60\x74\x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x24\x7b\x64\x78\x7d\x70\x78\x2c\x24\x7b\x64\x79\x7d\x70\x78\x29\x60\x3b\x0a\x20\x20\x20\x20\x73\x2e\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x44\x75\x72\x61\x74\x69\x6f\x6e\x20\x3d\x20\x22\x30\x73\x22\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x68\x61\x73\x43\x53\x53\x54\x72\x61\x6e\x73\x66\x6f\x72\x6d\x28\x65\x6c\x2c\x20\x72\x6f\x6f\x74\x2c\x20\x6d\x6f\x76\x65\x43\x6c\x61\x73\x73\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6c\x6f\x6e\x65\x20\x3d\x20\x65\x6c\x2e\x63\x6c\x6f\x6e\x65\x4e\x6f\x64\x65\x28\x29\x3b\x0a\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x5f\x76\x74\x63\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x76\x74\x63\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x63\x6c\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6c\x73\x2e\x73\x70\x6c\x69\x74\x28\x2f\x5c\x73\x2b\x2f\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x63\x29\x20\x3d\x3e\x20\x63\x20\x26\x26\x20\x63\x6c\x6f\x6e\x65\x2e\x63\x6c\x61\x73\x73\x4c\x69\x73\x74\x2e\x72\x65\x6d\x6f\x76\x65\x28\x63\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x6d\x6f\x76\x65\x43\x6c\x61\x73\x73\x2e\x73\x70\x6c\x69\x74\x28\x2f\x5c\x73\x2b\x2f\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x28\x63\x29\x20\x3d\x3e\x20\x63\x20\x26\x26\x20\x63\x6c\x6f\x6e\x65\x2e\x63\x6c\x61\x73\x73\x4c\x69\x73\x74\x2e\x61\x64\x64\x28\x63\x29\x29\x3b\x0a\x20\x20\x63\x6c\x6f\x6e\x65\x2e\x73\x74\x79\x6c\x65\x2e\x64\x69\x73\x70\x6c\x61\x79\x20\x3d\x20\x22\x6e\x6f\x6e\x65\x22\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x72\x6f\x6f\x74\x2e\x6e\x6f\x64\x65\x54\x79\x70\x65\x20\x3d\x3d\x3d\x20\x31\x20\x3f\x20\x72\x6f\x6f\x74\x20\x3a\x20\x72\x6f\x6f\x74\x2e\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65\x3b\x0a\x20\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x61\x70\x70\x65\x6e\x64\x43\x68\x69\x6c\x64\x28\x63\x6c\x6f\x6e\x65\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x68\x61\x73\x54\x72\x61\x6e\x73\x66\x6f\x72\x6d\x20\x7d\x20\x3d\x20\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x49\x6e\x66\x6f\x28\x63\x6c\x6f\x6e\x65\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x72\x65\x6d\x6f\x76\x65\x43\x68\x69\x6c\x64\x28\x63\x6c\x6f\x6e\x65\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x61\x73\x54\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x67\x65\x74\x4d\x6f\x64\x65\x6c\x41\x73\x73\x69\x67\x6e\x65\x72\x20\x3d\x20\x28\x76\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x6e\x20\x3d\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x5b\x22\x6f\x6e\x55\x70\x64\x61\x74\x65\x3a\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x22\x5d\x20\x7c\x7c\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x73\x41\x72\x72\x61\x79\x28\x66\x6e\x29\x20\x3f\x20\x28\x76\x61\x6c\x75\x65\x29\x20\x3d\x3e\x20\x69\x6e\x76\x6f\x6b\x65\x41\x72\x72\x61\x79\x46\x6e\x73\x28\x66\x6e\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x3a\x20\x66\x6e\x3b\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6f\x6e\x43\x6f\x6d\x70\x6f\x73\x69\x74\x69\x6f\x6e\x53\x74\x61\x72\x74\x28\x65\x29\x20\x7b\x0a\x20\x20\x65\x2e\x74\x61\x72\x67\x65\x74\x2e\x63\x6f\x6d\x70\x6f\x73\x69\x6e\x67\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6f\x6e\x43\x6f\x6d\x70\x6f\x73\x69\x74\x69\x6f\x6e\x45\x6e\x64\x28\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x74\x61\x72\x67\x65\x74\x20\x3d\x20\x65\x2e\x74\x61\x72\x67\x65\x74\x3b\x0a\x20\x20\x69\x66\x20\x28\x74\x61\x72\x67\x65\x74\x2e\x63\x6f\x6d\x70\x6f\x73\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x2e\x63\x6f\x6d\x70\x6f\x73\x69\x6e\x67\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x74\x61\x72\x67\x65\x74\x2e\x64\x69\x73\x70\x61\x74\x63\x68\x45\x76\x65\x6e\x74\x28\x6e\x65\x77\x20\x45\x76\x65\x6e\x74\x28\x22\x69\x6e\x70\x75\x74\x22\x29\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x76\x4d\x6f\x64\x65\x6c\x54\x65\x78\x74\x20\x3d\x20\x7b\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x64\x28\x65\x6c\x2c\x20\x7b\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x3a\x20\x7b\x20\x6c\x61\x7a\x79\x2c\x20\x74\x72\x69\x6d\x2c\x20\x6e\x75\x6d\x62\x65\x72\x20\x7d\x20\x7d\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x20\x3d\x20\x67\x65\x74\x4d\x6f\x64\x65\x6c\x41\x73\x73\x69\x67\x6e\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x61\x73\x74\x54\x6f\x4e\x75\x6d\x62\x65\x72\x20\x3d\x20\x6e\x75\x6d\x62\x65\x72\x20\x7c\x7c\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x6e\x75\x6d\x62\x65\x72\x22\x3b\x0a\x20\x20\x20\x20\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x6c\x61\x7a\x79\x20\x3f\x20\x22\x63\x68\x61\x6e\x67\x65\x22\x20\x3a\x20\x22\x69\x6e\x70\x75\x74\x22\x2c\x20\x28\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x2e\x74\x61\x72\x67\x65\x74\x2e\x63\x6f\x6d\x70\x6f\x73\x69\x6e\x67\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x6c\x65\x74\x20\x64\x6f\x6d\x56\x61\x6c\x75\x65\x20\x3d\x20\x65\x6c\x2e\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x69\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6f\x6d\x56\x61\x6c\x75\x65\x20\x3d\x20\x64\x6f\x6d\x56\x61\x6c\x75\x65\x2e\x74\x72\x69\x6d\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x61\x73\x74\x54\x6f\x4e\x75\x6d\x62\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6f\x6d\x56\x61\x6c\x75\x65\x20\x3d\x20\x74\x6f\x4e\x75\x6d\x62\x65\x72\x28\x64\x6f\x6d\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x28\x64\x6f\x6d\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x69\x6d\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x22\x63\x68\x61\x6e\x67\x65\x22\x2c\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x65\x6c\x2e\x76\x61\x6c\x75\x65\x2e\x74\x72\x69\x6d\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x6c\x61\x7a\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x22\x63\x6f\x6d\x70\x6f\x73\x69\x74\x69\x6f\x6e\x73\x74\x61\x72\x74\x22\x2c\x20\x6f\x6e\x43\x6f\x6d\x70\x6f\x73\x69\x74\x69\x6f\x6e\x53\x74\x61\x72\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x22\x63\x6f\x6d\x70\x6f\x73\x69\x74\x69\x6f\x6e\x65\x6e\x64\x22\x2c\x20\x6f\x6e\x43\x6f\x6d\x70\x6f\x73\x69\x74\x69\x6f\x6e\x45\x6e\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x22\x63\x68\x61\x6e\x67\x65\x22\x2c\x20\x6f\x6e\x43\x6f\x6d\x70\x6f\x73\x69\x74\x69\x6f\x6e\x45\x6e\x64\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x6d\x6f\x75\x6e\x74\x65\x64\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x22\x22\x20\x3a\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x2c\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x3a\x20\x7b\x20\x6c\x61\x7a\x79\x2c\x20\x74\x72\x69\x6d\x2c\x20\x6e\x75\x6d\x62\x65\x72\x20\x7d\x20\x7d\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x20\x3d\x20\x67\x65\x74\x4d\x6f\x64\x65\x6c\x41\x73\x73\x69\x67\x6e\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x63\x6f\x6d\x70\x6f\x73\x69\x6e\x67\x29\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x61\x63\x74\x69\x76\x65\x45\x6c\x65\x6d\x65\x6e\x74\x20\x3d\x3d\x3d\x20\x65\x6c\x20\x26\x26\x20\x65\x6c\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x22\x72\x61\x6e\x67\x65\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6c\x61\x7a\x79\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x69\x6d\x20\x26\x26\x20\x65\x6c\x2e\x76\x61\x6c\x75\x65\x2e\x74\x72\x69\x6d\x28\x29\x20\x3d\x3d\x3d\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x28\x6e\x75\x6d\x62\x65\x72\x20\x7c\x7c\x20\x65\x6c\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x6e\x75\x6d\x62\x65\x72\x22\x29\x20\x26\x26\x20\x74\x6f\x4e\x75\x6d\x62\x65\x72\x28\x65\x6c\x2e\x76\x61\x6c\x75\x65\x29\x20\x3d\x3d\x3d\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x20\x3d\x20\x76\x61\x6c\x75\x65\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x22\x22\x20\x3a\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x76\x61\x6c\x75\x65\x20\x21\x3d\x3d\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x76\x61\x6c\x75\x65\x20\x3d\x20\x6e\x65\x77\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x76\x4d\x6f\x64\x65\x6c\x43\x68\x65\x63\x6b\x62\x6f\x78\x20\x3d\x20\x7b\x0a\x20\x20\x64\x65\x65\x70\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x64\x28\x65\x6c\x2c\x20\x5f\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x20\x3d\x20\x67\x65\x74\x4d\x6f\x64\x65\x6c\x41\x73\x73\x69\x67\x6e\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x22\x63\x68\x61\x6e\x67\x65\x22\x2c\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x20\x3d\x20\x65\x6c\x2e\x5f\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x6c\x65\x6d\x65\x6e\x74\x56\x61\x6c\x75\x65\x20\x3d\x20\x67\x65\x74\x56\x61\x6c\x75\x65\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x68\x65\x63\x6b\x65\x64\x20\x3d\x20\x65\x6c\x2e\x63\x68\x65\x63\x6b\x65\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x73\x73\x69\x67\x6e\x20\x3d\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x6e\x64\x65\x78\x20\x3d\x20\x6c\x6f\x6f\x73\x65\x49\x6e\x64\x65\x78\x4f\x66\x28\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x2c\x20\x65\x6c\x65\x6d\x65\x6e\x74\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x6f\x75\x6e\x64\x20\x3d\x20\x69\x6e\x64\x65\x78\x20\x21\x3d\x3d\x20\x2d\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x65\x63\x6b\x65\x64\x20\x26\x26\x20\x21\x66\x6f\x75\x6e\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x73\x73\x69\x67\x6e\x28\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x2e\x63\x6f\x6e\x63\x61\x74\x28\x65\x6c\x65\x6d\x65\x6e\x74\x56\x61\x6c\x75\x65\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x21\x63\x68\x65\x63\x6b\x65\x64\x20\x26\x26\x20\x66\x6f\x75\x6e\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x69\x6c\x74\x65\x72\x65\x64\x20\x3d\x20\x5b\x2e\x2e\x2e\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x69\x6c\x74\x65\x72\x65\x64\x2e\x73\x70\x6c\x69\x63\x65\x28\x69\x6e\x64\x65\x78\x2c\x20\x31\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x73\x73\x69\x67\x6e\x28\x66\x69\x6c\x74\x65\x72\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x53\x65\x74\x28\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6c\x6f\x6e\x65\x64\x20\x3d\x20\x6e\x65\x77\x20\x53\x65\x74\x28\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x63\x68\x65\x63\x6b\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6c\x6f\x6e\x65\x64\x2e\x61\x64\x64\x28\x65\x6c\x65\x6d\x65\x6e\x74\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6c\x6f\x6e\x65\x64\x2e\x64\x65\x6c\x65\x74\x65\x28\x65\x6c\x65\x6d\x65\x6e\x74\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x73\x73\x69\x67\x6e\x28\x63\x6c\x6f\x6e\x65\x64\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x73\x73\x69\x67\x6e\x28\x67\x65\x74\x43\x68\x65\x63\x6b\x62\x6f\x78\x56\x61\x6c\x75\x65\x28\x65\x6c\x2c\x20\x63\x68\x65\x63\x6b\x65\x64\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x6d\x6f\x75\x6e\x74\x65\x64\x3a\x20\x73\x65\x74\x43\x68\x65\x63\x6b\x65\x64\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x20\x3d\x20\x67\x65\x74\x4d\x6f\x64\x65\x6c\x41\x73\x73\x69\x67\x6e\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x73\x65\x74\x43\x68\x65\x63\x6b\x65\x64\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x43\x68\x65\x63\x6b\x65\x64\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x2c\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x7d\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x65\x6c\x2e\x5f\x6d\x6f\x64\x65\x6c\x56\x61\x6c\x75\x65\x20\x3d\x20\x76\x61\x6c\x75\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x63\x68\x65\x63\x6b\x65\x64\x20\x3d\x20\x6c\x6f\x6f\x73\x65\x49\x6e\x64\x65\x78\x4f\x66\x28\x76\x61\x6c\x75\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x76\x61\x6c\x75\x65\x29\x20\x3e\x20\x2d\x31\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x53\x65\x74\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x63\x68\x65\x63\x6b\x65\x64\x20\x3d\x20\x76\x61\x6c\x75\x65\x2e\x68\x61\x73\x28\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x21\x3d\x3d\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x63\x68\x65\x63\x6b\x65\x64\x20\x3d\x20\x6c\x6f\x6f\x73\x65\x45\x71\x75\x61\x6c\x28\x76\x61\x6c\x75\x65\x2c\x20\x67\x65\x74\x43\x68\x65\x63\x6b\x62\x6f\x78\x56\x61\x6c\x75\x65\x28\x65\x6c\x2c\x20\x74\x72\x75\x65\x29\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x76\x4d\x6f\x64\x65\x6c\x52\x61\x64\x69\x6f\x20\x3d\x20\x7b\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x64\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x63\x68\x65\x63\x6b\x65\x64\x20\x3d\x20\x6c\x6f\x6f\x73\x65\x45\x71\x75\x61\x6c\x28\x76\x61\x6c\x75\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x20\x3d\x20\x67\x65\x74\x4d\x6f\x64\x65\x6c\x41\x73\x73\x69\x67\x6e\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x22\x63\x68\x61\x6e\x67\x65\x22\x2c\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x28\x67\x65\x74\x56\x61\x6c\x75\x65\x28\x65\x6c\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x2c\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x7d\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x20\x3d\x20\x67\x65\x74\x4d\x6f\x64\x65\x6c\x41\x73\x73\x69\x67\x6e\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x20\x21\x3d\x3d\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x63\x68\x65\x63\x6b\x65\x64\x20\x3d\x20\x6c\x6f\x6f\x73\x65\x45\x71\x75\x61\x6c\x28\x76\x61\x6c\x75\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x76\x4d\x6f\x64\x65\x6c\x53\x65\x6c\x65\x63\x74\x20\x3d\x20\x7b\x0a\x20\x20\x64\x65\x65\x70\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x64\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x2c\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x3a\x20\x7b\x20\x6e\x75\x6d\x62\x65\x72\x20\x7d\x20\x7d\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x53\x65\x74\x4d\x6f\x64\x65\x6c\x20\x3d\x20\x69\x73\x53\x65\x74\x28\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72\x28\x65\x6c\x2c\x20\x22\x63\x68\x61\x6e\x67\x65\x22\x2c\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x73\x65\x6c\x65\x63\x74\x65\x64\x56\x61\x6c\x20\x3d\x20\x41\x72\x72\x61\x79\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x2e\x66\x69\x6c\x74\x65\x72\x2e\x63\x61\x6c\x6c\x28\x65\x6c\x2e\x6f\x70\x74\x69\x6f\x6e\x73\x2c\x20\x28\x6f\x29\x20\x3d\x3e\x20\x6f\x2e\x73\x65\x6c\x65\x63\x74\x65\x64\x29\x2e\x6d\x61\x70\x28\x28\x6f\x29\x20\x3d\x3e\x20\x6e\x75\x6d\x62\x65\x72\x20\x3f\x20\x74\x6f\x4e\x75\x6d\x62\x65\x72\x28\x67\x65\x74\x56\x61\x6c\x75\x65\x28\x6f\x29\x29\x20\x3a\x20\x67\x65\x74\x56\x61\x6c\x75\x65\x28\x6f\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x28\x65\x6c\x2e\x6d\x75\x6c\x74\x69\x70\x6c\x65\x20\x3f\x20\x69\x73\x53\x65\x74\x4d\x6f\x64\x65\x6c\x20\x3f\x20\x6e\x65\x77\x20\x53\x65\x74\x28\x73\x65\x6c\x65\x63\x74\x65\x64\x56\x61\x6c\x29\x20\x3a\x20\x73\x65\x6c\x65\x63\x74\x65\x64\x56\x61\x6c\x20\x3a\x20\x73\x65\x6c\x65\x63\x74\x65\x64\x56\x61\x6c\x5b\x30\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x20\x3d\x20\x67\x65\x74\x4d\x6f\x64\x65\x6c\x41\x73\x73\x69\x67\x6e\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x6d\x6f\x75\x6e\x74\x65\x64\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x65\x74\x53\x65\x6c\x65\x63\x74\x65\x64\x28\x65\x6c\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x28\x65\x6c\x2c\x20\x5f\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x61\x73\x73\x69\x67\x6e\x20\x3d\x20\x67\x65\x74\x4d\x6f\x64\x65\x6c\x41\x73\x73\x69\x67\x6e\x65\x72\x28\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x75\x70\x64\x61\x74\x65\x64\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x65\x74\x53\x65\x6c\x65\x63\x74\x65\x64\x28\x65\x6c\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x53\x65\x6c\x65\x63\x74\x65\x64\x28\x65\x6c\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x69\x73\x4d\x75\x6c\x74\x69\x70\x6c\x65\x20\x3d\x20\x65\x6c\x2e\x6d\x75\x6c\x74\x69\x70\x6c\x65\x3b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x4d\x75\x6c\x74\x69\x70\x6c\x65\x20\x26\x26\x20\x21\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x75\x65\x29\x20\x26\x26\x20\x21\x69\x73\x53\x65\x74\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x2c\x20\x6c\x20\x3d\x20\x65\x6c\x2e\x6f\x70\x74\x69\x6f\x6e\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x20\x3c\x20\x6c\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x70\x74\x69\x6f\x6e\x20\x3d\x20\x65\x6c\x2e\x6f\x70\x74\x69\x6f\x6e\x73\x5b\x69\x5d\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6f\x70\x74\x69\x6f\x6e\x56\x61\x6c\x75\x65\x20\x3d\x20\x67\x65\x74\x56\x61\x6c\x75\x65\x28\x6f\x70\x74\x69\x6f\x6e\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x4d\x75\x6c\x74\x69\x70\x6c\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x70\x74\x69\x6f\x6e\x2e\x73\x65\x6c\x65\x63\x74\x65\x64\x20\x3d\x20\x6c\x6f\x6f\x73\x65\x49\x6e\x64\x65\x78\x4f\x66\x28\x76\x61\x6c\x75\x65\x2c\x20\x6f\x70\x74\x69\x6f\x6e\x56\x61\x6c\x75\x65\x29\x20\x3e\x20\x2d\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x70\x74\x69\x6f\x6e\x2e\x73\x65\x6c\x65\x63\x74\x65\x64\x20\x3d\x20\x76\x61\x6c\x75\x65\x2e\x68\x61\x73\x28\x6f\x70\x74\x69\x6f\x6e\x56\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6c\x6f\x6f\x73\x65\x45\x71\x75\x61\x6c\x28\x67\x65\x74\x56\x61\x6c\x75\x65\x28\x6f\x70\x74\x69\x6f\x6e\x29\x2c\x20\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x6c\x2e\x73\x65\x6c\x65\x63\x74\x65\x64\x49\x6e\x64\x65\x78\x20\x21\x3d\x3d\x20\x69\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x2e\x73\x65\x6c\x65\x63\x74\x65\x64\x49\x6e\x64\x65\x78\x20\x3d\x20\x69\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x69\x66\x20\x28\x21\x69\x73\x4d\x75\x6c\x74\x69\x70\x6c\x65\x20\x26\x26\x20\x65\x6c\x2e\x73\x65\x6c\x65\x63\x74\x65\x64\x49\x6e\x64\x65\x78\x20\x21\x3d\x3d\x20\x2d\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x73\x65\x6c\x65\x63\x74\x65\x64\x49\x6e\x64\x65\x78\x20\x3d\x20\x2d\x31\x3b\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x56\x61\x6c\x75\x65\x28\x65\x6c\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x22\x5f\x76\x61\x6c\x75\x65\x22\x20\x69\x6e\x20\x65\x6c\x20\x3f\x20\x65\x6c\x2e\x5f\x76\x61\x6c\x75\x65\x20\x3a\x20\x65\x6c\x2e\x76\x61\x6c\x75\x65\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x43\x68\x65\x63\x6b\x62\x6f\x78\x56\x61\x6c\x75\x65\x28\x65\x6c\x2c\x20\x63\x68\x65\x63\x6b\x65\x64\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x20\x3d\x20\x63\x68\x65\x63\x6b\x65\x64\x20\x3f\x20\x22\x5f\x74\x72\x75\x65\x56\x61\x6c\x75\x65\x22\x20\x3a\x20\x22\x5f\x66\x61\x6c\x73\x65\x56\x61\x6c\x75\x65\x22\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6b\x65\x79\x20\x69\x6e\x20\x65\x6c\x20\x3f\x20\x65\x6c\x5b\x6b\x65\x79\x5d\x20\x3a\x20\x63\x68\x65\x63\x6b\x65\x64\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x76\x4d\x6f\x64\x65\x6c\x44\x79\x6e\x61\x6d\x69\x63\x20\x3d\x20\x7b\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x64\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x4d\x6f\x64\x65\x6c\x48\x6f\x6f\x6b\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x22\x63\x72\x65\x61\x74\x65\x64\x22\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x6d\x6f\x75\x6e\x74\x65\x64\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x4d\x6f\x64\x65\x6c\x48\x6f\x6f\x6b\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x6e\x75\x6c\x6c\x2c\x20\x22\x6d\x6f\x75\x6e\x74\x65\x64\x22\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x4d\x6f\x64\x65\x6c\x48\x6f\x6f\x6b\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x2c\x20\x22\x62\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x22\x29\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x75\x70\x64\x61\x74\x65\x64\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x6c\x6c\x4d\x6f\x64\x65\x6c\x48\x6f\x6f\x6b\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x2c\x20\x22\x75\x70\x64\x61\x74\x65\x64\x22\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x65\x73\x6f\x6c\x76\x65\x44\x79\x6e\x61\x6d\x69\x63\x4d\x6f\x64\x65\x6c\x28\x74\x61\x67\x4e\x61\x6d\x65\x2c\x20\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x73\x77\x69\x74\x63\x68\x20\x28\x74\x61\x67\x4e\x61\x6d\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x53\x45\x4c\x45\x43\x54\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x4d\x6f\x64\x65\x6c\x53\x65\x6c\x65\x63\x74\x3b\x0a\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x54\x45\x58\x54\x41\x52\x45\x41\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x4d\x6f\x64\x65\x6c\x54\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x73\x77\x69\x74\x63\x68\x20\x28\x74\x79\x70\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x63\x68\x65\x63\x6b\x62\x6f\x78\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x4d\x6f\x64\x65\x6c\x43\x68\x65\x63\x6b\x62\x6f\x78\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x72\x61\x64\x69\x6f\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x4d\x6f\x64\x65\x6c\x52\x61\x64\x69\x6f\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x76\x4d\x6f\x64\x65\x6c\x54\x65\x78\x74\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x61\x6c\x6c\x4d\x6f\x64\x65\x6c\x48\x6f\x6f\x6b\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x2c\x20\x68\x6f\x6f\x6b\x29\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x64\x65\x6c\x54\x6f\x55\x73\x65\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x44\x79\x6e\x61\x6d\x69\x63\x4d\x6f\x64\x65\x6c\x28\x65\x6c\x2e\x74\x61\x67\x4e\x61\x6d\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x74\x79\x70\x65\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x66\x6e\x20\x3d\x20\x6d\x6f\x64\x65\x6c\x54\x6f\x55\x73\x65\x5b\x68\x6f\x6f\x6b\x5d\x3b\x0a\x20\x20\x66\x6e\x20\x26\x26\x20\x66\x6e\x28\x65\x6c\x2c\x20\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x2c\x20\x70\x72\x65\x76\x56\x4e\x6f\x64\x65\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x69\x74\x56\x4d\x6f\x64\x65\x6c\x46\x6f\x72\x53\x53\x52\x28\x29\x20\x7b\x0a\x20\x20\x76\x4d\x6f\x64\x65\x6c\x54\x65\x78\x74\x2e\x67\x65\x74\x53\x53\x52\x50\x72\x6f\x70\x73\x20\x3d\x20\x28\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x29\x20\x3d\x3e\x20\x28\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x29\x3b\x0a\x20\x20\x76\x4d\x6f\x64\x65\x6c\x52\x61\x64\x69\x6f\x2e\x67\x65\x74\x53\x53\x52\x50\x72\x6f\x70\x73\x20\x3d\x20\x28\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x6c\x6f\x6f\x73\x65\x45\x71\x75\x61\x6c\x28\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x76\x61\x6c\x75\x65\x2c\x20\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x20\x63\x68\x65\x63\x6b\x65\x64\x3a\x20\x74\x72\x75\x65\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x76\x4d\x6f\x64\x65\x6c\x43\x68\x65\x63\x6b\x62\x6f\x78\x2e\x67\x65\x74\x53\x53\x52\x50\x72\x6f\x70\x73\x20\x3d\x20\x28\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x69\x73\x41\x72\x72\x61\x79\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x6c\x6f\x6f\x73\x65\x49\x6e\x64\x65\x78\x4f\x66\x28\x76\x61\x6c\x75\x65\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x76\x61\x6c\x75\x65\x29\x20\x3e\x20\x2d\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x20\x63\x68\x65\x63\x6b\x65\x64\x3a\x20\x74\x72\x75\x65\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x69\x73\x53\x65\x74\x28\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x76\x61\x6c\x75\x65\x2e\x68\x61\x73\x28\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x76\x61\x6c\x75\x65\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x20\x63\x68\x65\x63\x6b\x65\x64\x3a\x20\x74\x72\x75\x65\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x20\x63\x68\x65\x63\x6b\x65\x64\x3a\x20\x74\x72\x75\x65\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x76\x4d\x6f\x64\x65\x6c\x44\x79\x6e\x61\x6d\x69\x63\x2e\x67\x65\x74\x53\x53\x52\x50\x72\x6f\x70\x73\x20\x3d\x20\x28\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x22\x73\x74\x72\x69\x6e\x67\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x64\x65\x6c\x54\x6f\x55\x73\x65\x20\x3d\x20\x72\x65\x73\x6f\x6c\x76\x65\x44\x79\x6e\x61\x6d\x69\x63\x4d\x6f\x64\x65\x6c\x28\x76\x6e\x6f\x64\x65\x2e\x74\x79\x70\x65\x2e\x74\x6f\x55\x70\x70\x65\x72\x43\x61\x73\x65\x28\x29\x2c\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x20\x26\x26\x20\x76\x6e\x6f\x64\x65\x2e\x70\x72\x6f\x70\x73\x2e\x74\x79\x70\x65\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6d\x6f\x64\x65\x6c\x54\x6f\x55\x73\x65\x2e\x67\x65\x74\x53\x53\x52\x50\x72\x6f\x70\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6d\x6f\x64\x65\x6c\x54\x6f\x55\x73\x65\x2e\x67\x65\x74\x53\x53\x52\x50\x72\x6f\x70\x73\x28\x62\x69\x6e\x64\x69\x6e\x67\x2c\x20\x76\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x73\x79\x73\x74\x65\x6d\x4d\x6f\x64\x69\x66\x69\x65\x72\x73\x20\x3d\x20\x5b\x22\x63\x74\x72\x6c\x22\x2c\x20\x22\x73\x68\x69\x66\x74\x22\x2c\x20\x22\x61\x6c\x74\x22\x2c\x20\x22\x6d\x65\x74\x61\x22\x5d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x47\x75\x61\x72\x64\x73\x20\x3d\x20\x7b\x0a\x20\x20\x73\x74\x6f\x70\x3a\x20\x28\x65\x29\x20\x3d\x3e\x20\x65\x2e\x73\x74\x6f\x70\x50\x72\x6f\x70\x61\x67\x61\x74\x69\x6f\x6e\x28\x29\x2c\x0a\x20\x20\x70\x72\x65\x76\x65\x6e\x74\x3a\x20\x28\x65\x29\x20\x3d\x3e\x20\x65\x2e\x70\x72\x65\x76\x65\x6e\x74\x44\x65\x66\x61\x75\x6c\x74\x28\x29\x2c\x0a\x20\x20\x73\x65\x6c\x66\x3a\x20\x28\x65\x29\x20\x3d\x3e\x20\x65\x2e\x74\x61\x72\x67\x65\x74\x20\x21\x3d\x3d\x20\x65\x2e\x63\x75\x72\x72\x65\x6e\x74\x54\x61\x72\x67\x65\x74\x2c\x0a\x20\x20\x63\x74\x72\x6c\x3a\x20\x28\x65\x29\x20\x3d\x3e\x20\x21\x65\x2e\x63\x74\x72\x6c\x4b\x65\x79\x2c\x0a\x20\x20\x73\x68\x69\x66\x74\x3a\x20\x28\x65\x29\x20\x3d\x3e\x20\x21\x65\x2e\x73\x68\x69\x66\x74\x4b\x65\x79\x2c\x0a\x20\x20\x61\x6c\x74\x3a\x20\x28\x65\x29\x20\x3d\x3e\x20\x21\x65\x2e\x61\x6c\x74\x4b\x65\x79\x2c\x0a\x20\x20\x6d\x65\x74\x61\x3a\x20\x28\x65\x29\x20\x3d\x3e\x20\x21\x65\x2e\x6d\x65\x74\x61\x4b\x65\x79\x2c\x0a\x20\x20\x6c\x65\x66\x74\x3a\x20\x28\x65\x29\x20\x3d\x3e\x20\x22\x62\x75\x74\x74\x6f\x6e\x22\x20\x69\x6e\x20\x65\x20\x26\x26\x20\x65\x2e\x62\x75\x74\x74\x6f\x6e\x20\x21\x3d\x3d\x20\x30\x2c\x0a\x20\x20\x6d\x69\x64\x64\x6c\x65\x3a\x20\x28\x65\x29\x20\x3d\x3e\x20\x22\x62\x75\x74\x74\x6f\x6e\x22\x20\x69\x6e\x20\x65\x20\x26\x26\x20\x65\x2e\x62\x75\x74\x74\x6f\x6e\x20\x21\x3d\x3d\x20\x31\x2c\x0a\x20\x20\x72\x69\x67\x68\x74\x3a\x20\x28\x65\x29\x20\x3d\x3e\x20\x22\x62\x75\x74\x74\x6f\x6e\x22\x20\x69\x6e\x20\x65\x20\x26\x26\x20\x65\x2e\x62\x75\x74\x74\x6f\x6e\x20\x21\x3d\x3d\x20\x32\x2c\x0a\x20\x20\x65\x78\x61\x63\x74\x3a\x20\x28\x65\x2c\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x29\x20\x3d\x3e\x20\x73\x79\x73\x74\x65\x6d\x4d\x6f\x64\x69\x66\x69\x65\x72\x73\x2e\x73\x6f\x6d\x65\x28\x28\x6d\x29\x20\x3d\x3e\x20\x65\x5b\x60\x24\x7b\x6d\x7d\x4b\x65\x79\x60\x5d\x20\x26\x26\x20\x21\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x2e\x69\x6e\x63\x6c\x75\x64\x65\x73\x28\x6d\x29\x29\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x77\x69\x74\x68\x4d\x6f\x64\x69\x66\x69\x65\x72\x73\x20\x3d\x20\x28\x66\x6e\x2c\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x65\x76\x65\x6e\x74\x2c\x20\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x6c\x65\x74\x20\x69\x20\x3d\x20\x30\x3b\x20\x69\x20\x3c\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x67\x75\x61\x72\x64\x20\x3d\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x47\x75\x61\x72\x64\x73\x5b\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x5b\x69\x5d\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x67\x75\x61\x72\x64\x20\x26\x26\x20\x67\x75\x61\x72\x64\x28\x65\x76\x65\x6e\x74\x2c\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x6e\x28\x65\x76\x65\x6e\x74\x2c\x20\x2e\x2e\x2e\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x7d\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x6b\x65\x79\x4e\x61\x6d\x65\x73\x20\x3d\x20\x7b\x0a\x20\x20\x65\x73\x63\x3a\x20\x22\x65\x73\x63\x61\x70\x65\x22\x2c\x0a\x20\x20\x73\x70\x61\x63\x65\x3a\x20\x22\x20\x22\x2c\x0a\x20\x20\x75\x70\x3a\x20\x22\x61\x72\x72\x6f\x77\x2d\x75\x70\x22\x2c\x0a\x20\x20\x6c\x65\x66\x74\x3a\x20\x22\x61\x72\x72\x6f\x77\x2d\x6c\x65\x66\x74\x22\x2c\x0a\x20\x20\x72\x69\x67\x68\x74\x3a\x20\x22\x61\x72\x72\x6f\x77\x2d\x72\x69\x67\x68\x74\x22\x2c\x0a\x20\x20\x64\x6f\x77\x6e\x3a\x20\x22\x61\x72\x72\x6f\x77\x2d\x64\x6f\x77\x6e\x22\x2c\x0a\x20\x20\x64\x65\x6c\x65\x74\x65\x3a\x20\x22\x62\x61\x63\x6b\x73\x70\x61\x63\x65\x22\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x77\x69\x74\x68\x4b\x65\x79\x73\x20\x3d\x20\x28\x66\x6e\x2c\x20\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x65\x76\x65\x6e\x74\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x28\x22\x6b\x65\x79\x22\x20\x69\x6e\x20\x65\x76\x65\x6e\x74\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x65\x76\x65\x6e\x74\x4b\x65\x79\x20\x3d\x20\x68\x79\x70\x68\x65\x6e\x61\x74\x65\x28\x65\x76\x65\x6e\x74\x2e\x6b\x65\x79\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x6d\x6f\x64\x69\x66\x69\x65\x72\x73\x2e\x73\x6f\x6d\x65\x28\x28\x6b\x29\x20\x3d\x3e\x20\x6b\x20\x3d\x3d\x3d\x20\x65\x76\x65\x6e\x74\x4b\x65\x79\x20\x7c\x7c\x20\x6b\x65\x79\x4e\x61\x6d\x65\x73\x5b\x6b\x5d\x20\x3d\x3d\x3d\x20\x65\x76\x65\x6e\x74\x4b\x65\x79\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x6e\x28\x65\x76\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x76\x53\x68\x6f\x77\x20\x3d\x20\x7b\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x2c\x20\x7b\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x7d\x29\x20\x7b\x0a\x20\x20\x20\x20\x65\x6c\x2e\x5f\x76\x6f\x64\x20\x3d\x20\x65\x6c\x2e\x73\x74\x79\x6c\x65\x2e\x64\x69\x73\x70\x6c\x61\x79\x20\x3d\x3d\x3d\x20\x22\x6e\x6f\x6e\x65\x22\x20\x3f\x20\x22\x22\x20\x3a\x20\x65\x6c\x2e\x73\x74\x79\x6c\x65\x2e\x64\x69\x73\x70\x6c\x61\x79\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x26\x26\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x62\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x44\x69\x73\x70\x6c\x61\x79\x28\x65\x6c\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x6d\x6f\x75\x6e\x74\x65\x64\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x2c\x20\x7b\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x7d\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x26\x26\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x65\x6e\x74\x65\x72\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x75\x70\x64\x61\x74\x65\x64\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x2c\x20\x6f\x6c\x64\x56\x61\x6c\x75\x65\x20\x7d\x2c\x20\x7b\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x20\x7d\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x76\x61\x6c\x75\x65\x20\x3d\x3d\x3d\x20\x21\x6f\x6c\x64\x56\x61\x6c\x75\x65\x29\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x62\x65\x66\x6f\x72\x65\x45\x6e\x74\x65\x72\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x44\x69\x73\x70\x6c\x61\x79\x28\x65\x6c\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x65\x6e\x74\x65\x72\x28\x65\x6c\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2e\x6c\x65\x61\x76\x65\x28\x65\x6c\x2c\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65\x74\x44\x69\x73\x70\x6c\x61\x79\x28\x65\x6c\x2c\x20\x66\x61\x6c\x73\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x73\x65\x74\x44\x69\x73\x70\x6c\x61\x79\x28\x65\x6c\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x62\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x28\x65\x6c\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x65\x74\x44\x69\x73\x70\x6c\x61\x79\x28\x65\x6c\x2c\x20\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x65\x74\x44\x69\x73\x70\x6c\x61\x79\x28\x65\x6c\x2c\x20\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x65\x6c\x2e\x73\x74\x79\x6c\x65\x2e\x64\x69\x73\x70\x6c\x61\x79\x20\x3d\x20\x76\x61\x6c\x75\x65\x20\x3f\x20\x65\x6c\x2e\x5f\x76\x6f\x64\x20\x3a\x20\x22\x6e\x6f\x6e\x65\x22\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x6e\x69\x74\x56\x53\x68\x6f\x77\x46\x6f\x72\x53\x53\x52\x28\x29\x20\x7b\x0a\x20\x20\x76\x53\x68\x6f\x77\x2e\x67\x65\x74\x53\x53\x52\x50\x72\x6f\x70\x73\x20\x3d\x20\x28\x7b\x20\x76\x61\x6c\x75\x65\x20\x7d\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x76\x61\x6c\x75\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x20\x73\x74\x79\x6c\x65\x3a\x20\x7b\x20\x64\x69\x73\x70\x6c\x61\x79\x3a\x20\x22\x6e\x6f\x6e\x65\x22\x20\x7d\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x65\x78\x74\x65\x6e\x64\x28\x7b\x20\x70\x61\x74\x63\x68\x50\x72\x6f\x70\x20\x7d\x2c\x20\x6e\x6f\x64\x65\x4f\x70\x73\x29\x3b\x0a\x6c\x65\x74\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x3b\x0a\x6c\x65\x74\x20\x65\x6e\x61\x62\x6c\x65\x64\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x65\x6e\x73\x75\x72\x65\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x20\x7c\x7c\x20\x28\x72\x65\x6e\x64\x65\x72\x65\x72\x20\x3d\x20\x63\x72\x65\x61\x74\x65\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x72\x65\x6e\x64\x65\x72\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x29\x29\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x65\x6e\x73\x75\x72\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x29\x20\x7b\x0a\x20\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x20\x3d\x20\x65\x6e\x61\x62\x6c\x65\x64\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x20\x3f\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x20\x3a\x20\x63\x72\x65\x61\x74\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x72\x65\x6e\x64\x65\x72\x65\x72\x4f\x70\x74\x69\x6f\x6e\x73\x29\x3b\x0a\x20\x20\x65\x6e\x61\x62\x6c\x65\x64\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x6e\x64\x65\x72\x65\x72\x3b\x0a\x7d\x0a\x63\x6f\x6e\x73\x74\x20\x72\x65\x6e\x64\x65\x72\x20\x3d\x20\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x65\x6e\x73\x75\x72\x65\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x29\x2e\x72\x65\x6e\x64\x65\x72\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x68\x79\x64\x72\x61\x74\x65\x20\x3d\x20\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x65\x6e\x73\x75\x72\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x29\x2e\x68\x79\x64\x72\x61\x74\x65\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x63\x72\x65\x61\x74\x65\x41\x70\x70\x20\x3d\x20\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x70\x70\x32\x20\x3d\x20\x65\x6e\x73\x75\x72\x65\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x29\x2e\x63\x72\x65\x61\x74\x65\x41\x70\x70\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6d\x6f\x75\x6e\x74\x20\x7d\x20\x3d\x20\x61\x70\x70\x32\x3b\x0a\x20\x20\x61\x70\x70\x32\x2e\x6d\x6f\x75\x6e\x74\x20\x3d\x20\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x4f\x72\x53\x65\x6c\x65\x63\x74\x6f\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x4f\x72\x53\x65\x6c\x65\x63\x74\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x20\x3d\x20\x61\x70\x70\x32\x2e\x5f\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e\x28\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x29\x20\x26\x26\x20\x21\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x72\x65\x6e\x64\x65\x72\x20\x26\x26\x20\x21\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x74\x65\x6d\x70\x6c\x61\x74\x65\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2e\x74\x65\x6d\x70\x6c\x61\x74\x65\x20\x3d\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c\x20\x3d\x20\x22\x22\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x70\x72\x6f\x78\x79\x20\x3d\x20\x6d\x6f\x75\x6e\x74\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x66\x61\x6c\x73\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x6f\x66\x20\x53\x56\x47\x45\x6c\x65\x6d\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x6f\x66\x20\x45\x6c\x65\x6d\x65\x6e\x74\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x72\x65\x6d\x6f\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x22\x76\x2d\x63\x6c\x6f\x61\x6b\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x22\x64\x61\x74\x61\x2d\x76\x2d\x61\x70\x70\x22\x2c\x20\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x6f\x78\x79\x3b\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x70\x70\x32\x3b\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x63\x72\x65\x61\x74\x65\x53\x53\x52\x41\x70\x70\x20\x3d\x20\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x61\x70\x70\x32\x20\x3d\x20\x65\x6e\x73\x75\x72\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x52\x65\x6e\x64\x65\x72\x65\x72\x28\x29\x2e\x63\x72\x65\x61\x74\x65\x41\x70\x70\x28\x2e\x2e\x2e\x61\x72\x67\x73\x29\x3b\x0a\x20\x20\x63\x6f\x6e\x73\x74\x20\x7b\x20\x6d\x6f\x75\x6e\x74\x20\x7d\x20\x3d\x20\x61\x70\x70\x32\x3b\x0a\x20\x20\x61\x70\x70\x32\x2e\x6d\x6f\x75\x6e\x74\x20\x3d\x20\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x4f\x72\x53\x65\x6c\x65\x63\x74\x6f\x72\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x3d\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x4f\x72\x53\x65\x6c\x65\x63\x74\x6f\x72\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6d\x6f\x75\x6e\x74\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x2c\x20\x74\x72\x75\x65\x2c\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x6f\x66\x20\x53\x56\x47\x45\x6c\x65\x6d\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x70\x70\x32\x3b\x0a\x7d\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x69\x73\x53\x74\x72\x69\x6e\x67\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6e\x73\x74\x20\x72\x65\x73\x20\x3d\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63\x74\x6f\x72\x28\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x65\x73\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x3b\x0a\x7d\x0a\x6c\x65\x74\x20\x73\x73\x72\x44\x69\x72\x65\x63\x74\x69\x76\x65\x49\x6e\x69\x74\x69\x61\x6c\x69\x7a\x65\x64\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x69\x6e\x69\x74\x44\x69\x72\x65\x63\x74\x69\x76\x65\x73\x46\x6f\x72\x53\x53\x52\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x21\x73\x73\x72\x44\x69\x72\x65\x63\x74\x69\x76\x65\x49\x6e\x69\x74\x69\x61\x6c\x69\x7a\x65\x64\x29\x20\x7b\x0a\x20\x20\x20\x20\x73\x73\x72\x44\x69\x72\x65\x63\x74\x69\x76\x65\x49\x6e\x69\x74\x69\x61\x6c\x69\x7a\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x69\x6e\x69\x74\x56\x4d\x6f\x64\x65\x6c\x46\x6f\x72\x53\x53\x52\x28\x29\x3b\x0a\x20\x20\x20\x20\x69\x6e\x69\x74\x56\x53\x68\x6f\x77\x46\x6f\x72\x53\x53\x52\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x7d\x3b\x0a\x63\x6f\x6e\x73\x74\x20\x63\x6f\x6d\x70\x69\x6c\x65\x20\x3d\x20\x28\x29\x20\x3d\x3e\x20\x7b\x0a\x7d\x3b\x0a\x76\x61\x72\x20\x76\x75\x65\x5f\x72\x75\x6e\x74\x69\x6d\x65\x5f\x65\x73\x6d\x42\x75\x6e\x64\x6c\x65\x72\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x66\x72\x65\x65\x7a\x65\x28\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x7b\x0a\x20\x20\x5f\x5f\x70\x72\x6f\x74\x6f\x5f\x5f\x3a\x20\x6e\x75\x6c\x6c\x2c\x0a\x20\x20\x63\x6f\x6d\x70\x69\x6c\x65\x2c\x0a\x20\x20\x45\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x2c\x0a\x20\x20\x52\x65\x61\x63\x74\x69\x76\x65\x45\x66\x66\x65\x63\x74\x2c\x0a\x20\x20\x63\x75\x73\x74\x6f\x6d\x52\x65\x66\x2c\x0a\x20\x20\x65\x66\x66\x65\x63\x74\x2c\x0a\x20\x20\x65\x66\x66\x65\x63\x74\x53\x63\x6f\x70\x65\x2c\x0a\x20\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x53\x63\x6f\x70\x65\x2c\x0a\x20\x20\x69\x73\x50\x72\x6f\x78\x79\x2c\x0a\x20\x20\x69\x73\x52\x65\x61\x63\x74\x69\x76\x65\x2c\x0a\x20\x20\x69\x73\x52\x65\x61\x64\x6f\x6e\x6c\x79\x2c\x0a\x20\x20\x69\x73\x52\x65\x66\x2c\x0a\x20\x20\x69\x73\x53\x68\x61\x6c\x6c\x6f\x77\x2c\x0a\x20\x20\x6d\x61\x72\x6b\x52\x61\x77\x2c\x0a\x20\x20\x6f\x6e\x53\x63\x6f\x70\x65\x44\x69\x73\x70\x6f\x73\x65\x2c\x0a\x20\x20\x70\x72\x6f\x78\x79\x52\x65\x66\x73\x2c\x0a\x20\x20\x72\x65\x61\x63\x74\x69\x76\x65\x2c\x0a\x20\x20\x72\x65\x61\x64\x6f\x6e\x6c\x79\x2c\x0a\x20\x20\x72\x65\x66\x2c\x0a\x20\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x63\x74\x69\x76\x65\x2c\x0a\x20\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x61\x64\x6f\x6e\x6c\x79\x2c\x0a\x20\x20\x73\x68\x61\x6c\x6c\x6f\x77\x52\x65\x66\x2c\x0a\x20\x20\x73\x74\x6f\x70\x2c\x0a\x20\x20\x74\x6f\x52\x61\x77\x2c\x0a\x20\x20\x74\x6f\x52\x65\x66\x2c\x0a\x20\x20\x74\x6f\x52\x65\x66\x73\x2c\x0a\x20\x20\x74\x72\x69\x67\x67\x65\x72\x52\x65\x66\x2c\x0a\x20\x20\x75\x6e\x72\x65\x66\x2c\x0a\x20\x20\x63\x61\x6d\x65\x6c\x69\x7a\x65\x2c\x0a\x20\x20\x63\x61\x70\x69\x74\x61\x6c\x69\x7a\x65\x2c\x0a\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x43\x6c\x61\x73\x73\x2c\x0a\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x50\x72\x6f\x70\x73\x2c\x0a\x20\x20\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65\x53\x74\x79\x6c\x65\x2c\x0a\x20\x20\x74\x6f\x44\x69\x73\x70\x6c\x61\x79\x53\x74\x72\x69\x6e\x67\x2c\x0a\x20\x20\x74\x6f\x48\x61\x6e\x64\x6c\x65\x72\x4b\x65\x79\x2c\x0a\x20\x20\x42\x61\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2c\x0a\x20\x20\x43\x6f\x6d\x6d\x65\x6e\x74\x2c\x0a\x20\x20\x46\x72\x61\x67\x6d\x65\x6e\x74\x2c\x0a\x20\x20\x4b\x65\x65\x70\x41\x6c\x69\x76\x65\x2c\x0a\x20\x20\x53\x74\x61\x74\x69\x63\x2c\x0a\x20\x20\x53\x75\x73\x70\x65\x6e\x73\x65\x2c\x0a\x20\x20\x54\x65\x6c\x65\x70\x6f\x72\x74\x2c\x0a\x20\x20\x54\x65\x78\x74\x2c\x0a\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x41\x73\x79\x6e\x63\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x2c\x0a\x20\x20\x63\x61\x6c\x6c\x57\x69\x74\x68\x45\x72\x72\x6f\x72\x48\x61\x6e\x64\x6c\x69\x6e\x67\x2c\x0a\x20\x20\x63\x6c\x6f\x6e\x65\x56\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x63\x6f\x6d\x70\x61\x74\x55\x74\x69\x6c\x73\x2c\x0a\x20\x20\x63\x6f\x6d\x70\x75\x74\x65\x64\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x42\x6c\x6f\x63\x6b\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x43\x6f\x6d\x6d\x65\x6e\x74\x56\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x42\x6c\x6f\x63\x6b\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74\x56\x4e\x6f\x64\x65\x3a\x20\x63\x72\x65\x61\x74\x65\x42\x61\x73\x65\x56\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x48\x79\x64\x72\x61\x74\x69\x6f\x6e\x52\x65\x6e\x64\x65\x72\x65\x72\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x50\x72\x6f\x70\x73\x52\x65\x73\x74\x50\x72\x6f\x78\x79\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x52\x65\x6e\x64\x65\x72\x65\x72\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x53\x6c\x6f\x74\x73\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x69\x63\x56\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x56\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x56\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x64\x65\x66\x69\x6e\x65\x41\x73\x79\x6e\x63\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x64\x65\x66\x69\x6e\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x64\x65\x66\x69\x6e\x65\x45\x6d\x69\x74\x73\x2c\x0a\x20\x20\x64\x65\x66\x69\x6e\x65\x45\x78\x70\x6f\x73\x65\x2c\x0a\x20\x20\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x73\x2c\x0a\x20\x20\x67\x65\x74\x20\x64\x65\x76\x74\x6f\x6f\x6c\x73\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x64\x65\x76\x74\x6f\x6f\x6c\x73\x3b\x0a\x20\x20\x7d\x2c\x0a\x20\x20\x67\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x49\x6e\x73\x74\x61\x6e\x63\x65\x2c\x0a\x20\x20\x67\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x52\x61\x77\x43\x68\x69\x6c\x64\x72\x65\x6e\x2c\x0a\x20\x20\x67\x75\x61\x72\x64\x52\x65\x61\x63\x74\x69\x76\x65\x50\x72\x6f\x70\x73\x2c\x0a\x20\x20\x68\x2c\x0a\x20\x20\x68\x61\x6e\x64\x6c\x65\x45\x72\x72\x6f\x72\x2c\x0a\x20\x20\x69\x6e\x69\x74\x43\x75\x73\x74\x6f\x6d\x46\x6f\x72\x6d\x61\x74\x74\x65\x72\x2c\x0a\x20\x20\x69\x6e\x6a\x65\x63\x74\x2c\x0a\x20\x20\x69\x73\x4d\x65\x6d\x6f\x53\x61\x6d\x65\x2c\x0a\x20\x20\x69\x73\x52\x75\x6e\x74\x69\x6d\x65\x4f\x6e\x6c\x79\x2c\x0a\x20\x20\x69\x73\x56\x4e\x6f\x64\x65\x2c\x0a\x20\x20\x6d\x65\x72\x67\x65\x44\x65\x66\x61\x75\x6c\x74\x73\x2c\x0a\x20\x20\x6d\x65\x72\x67\x65\x50\x72\x6f\x70\x73\x2c\x0a\x20\x20\x6e\x65\x78\x74\x54\x69\x63\x6b\x2c\x0a\x20\x20\x6f\x6e\x41\x63\x74\x69\x76\x61\x74\x65\x64\x2c\x0a\x20\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x4d\x6f\x75\x6e\x74\x2c\x0a\x20\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x55\x6e\x6d\x6f\x75\x6e\x74\x2c\x0a\x20\x20\x6f\x6e\x42\x65\x66\x6f\x72\x65\x55\x70\x64\x61\x74\x65\x2c\x0a\x20\x20\x6f\x6e\x44\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x2c\x0a\x20\x20\x6f\x6e\x45\x72\x72\x6f\x72\x43\x61\x70\x74\x75\x72\x65\x64\x2c\x0a\x20\x20\x6f\x6e\x4d\x6f\x75\x6e\x74\x65\x64\x2c\x0a\x20\x20\x6f\x6e\x52\x65\x6e\x64\x65\x72\x54\x72\x61\x63\x6b\x65\x64\x2c\x0a\x20\x20\x6f\x6e\x52\x65\x6e\x64\x65\x72\x54\x72\x69\x67\x67\x65\x72\x65\x64\x2c\x0a\x20\x20\x6f\x6e\x53\x65\x72\x76\x65\x72\x50\x72\x65\x66\x65\x74\x63\x68\x2c\x0a\x20\x20\x6f\x6e\x55\x6e\x6d\x6f\x75\x6e\x74\x65\x64\x2c\x0a\x20\x20\x6f\x6e\x55\x70\x64\x61\x74\x65\x64\x2c\x0a\x20\x20\x6f\x70\x65\x6e\x42\x6c\x6f\x63\x6b\x2c\x0a\x20\x20\x70\x6f\x70\x53\x63\x6f\x70\x65\x49\x64\x2c\x0a\x20\x20\x70\x72\x6f\x76\x69\x64\x65\x2c\x0a\x20\x20\x70\x75\x73\x68\x53\x63\x6f\x70\x65\x49\x64\x2c\x0a\x20\x20\x71\x75\x65\x75\x65\x50\x6f\x73\x74\x46\x6c\x75\x73\x68\x43\x62\x2c\x0a\x20\x20\x72\x65\x67\x69\x73\x74\x65\x72\x52\x75\x6e\x74\x69\x6d\x65\x43\x6f\x6d\x70\x69\x6c\x65\x72\x2c\x0a\x20\x20\x72\x65\x6e\x64\x65\x72\x4c\x69\x73\x74\x2c\x0a\x20\x20\x72\x65\x6e\x64\x65\x72\x53\x6c\x6f\x74\x2c\x0a\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x44\x69\x72\x65\x63\x74\x69\x76\x65\x2c\x0a\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x44\x79\x6e\x61\x6d\x69\x63\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x2c\x0a\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x46\x69\x6c\x74\x65\x72\x2c\x0a\x20\x20\x72\x65\x73\x6f\x6c\x76\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x2c\x0a\x20\x20\x73\x65\x74\x42\x6c\x6f\x63\x6b\x54\x72\x61\x63\x6b\x69\x6e\x67\x2c\x0a\x20\x20\x73\x65\x74\x44\x65\x76\x74\x6f\x6f\x6c\x73\x48\x6f\x6f\x6b\x2c\x0a\x20\x20\x73\x65\x74\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x48\x6f\x6f\x6b\x73\x2c\x0a\x20\x20\x73\x73\x72\x43\x6f\x6e\x74\x65\x78\x74\x4b\x65\x79\x2c\x0a\x20\x20\x73\x73\x72\x55\x74\x69\x6c\x73\x2c\x0a\x20\x20\x74\x6f\x48\x61\x6e\x64\x6c\x65\x72\x73\x2c\x0a\x20\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x56\x4e\x6f\x64\x65\x41\x72\x67\x73\x2c\x0a\x20\x20\x75\x73\x65\x41\x74\x74\x72\x73\x2c\x0a\x20\x20\x75\x73\x65\x53\x53\x52\x43\x6f\x6e\x74\x65\x78\x74\x2c\x0a\x20\x20\x75\x73\x65\x53\x6c\x6f\x74\x73\x2c\x0a\x20\x20\x75\x73\x65\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x53\x74\x61\x74\x65\x2c\x0a\x20\x20\x76\x65\x72\x73\x69\x6f\x6e\x2c\x0a\x20\x20\x77\x61\x72\x6e\x3a\x20\x77\x61\x72\x6e\x24\x31\x2c\x0a\x20\x20\x77\x61\x74\x63\x68\x2c\x0a\x20\x20\x77\x61\x74\x63\x68\x45\x66\x66\x65\x63\x74\x2c\x0a\x20\x20\x77\x61\x74\x63\x68\x50\x6f\x73\x74\x45\x66\x66\x65\x63\x74\x2c\x0a\x20\x20\x77\x61\x74\x63\x68\x53\x79\x6e\x63\x45\x66\x66\x65\x63\x74\x2c\x0a\x20\x20\x77\x69\x74\x68\x41\x73\x79\x6e\x63\x43\x6f\x6e\x74\x65\x78\x74\x2c\x0a\x20\x20\x77\x69\x74\x68\x43\x74\x78\x2c\x0a\x20\x20\x77\x69\x74\x68\x44\x65\x66\x61\x75\x6c\x74\x73\x2c\x0a\x20\x20\x77\x69\x74\x68\x44\x69\x72\x65\x63\x74\x69\x76\x65\x73\x2c\x0a\x20\x20\x77\x69\x74\x68\x4d\x65\x6d\x6f\x2c\x0a\x20\x20\x77\x69\x74\x68\x53\x63\x6f\x70\x65\x49\x64\x2c\x0a\x20\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x2c\x0a\x20\x20\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x47\x72\x6f\x75\x70\x2c\x0a\x20\x20\x56\x75\x65\x45\x6c\x65\x6d\x65\x6e\x74\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x41\x70\x70\x2c\x0a\x20\x20\x63\x72\x65\x61\x74\x65\x53\x53\x52\x41\x70\x70\x2c\x0a\x20\x20\x64\x65\x66\x69\x6e\x65\x43\x75\x73\x74\x6f\x6d\x45\x6c\x65\x6d\x65\x6e\x74\x2c\x0a\x20\x20\x64\x65\x66\x69\x6e\x65\x53\x53\x52\x43\x75\x73\x74\x6f\x6d\x45\x6c\x65\x6d\x65\x6e\x74\x2c\x0a\x20\x20\x68\x79\x64\x72\x61\x74\x65\x2c\x0a\x20\x20\x69\x6e\x69\x74\x44\x69\x72\x65\x63\x74\x69\x76\x65\x73\x46\x6f\x72\x53\x53\x52\x2c\x0a\x20\x20\x72\x65\x6e\x64\x65\x72\x2c\x0a\x20\x20\x75\x73\x65\x43\x73\x73\x4d\x6f\x64\x75\x6c\x65\x2c\x0a\x20\x20\x75\x73\x65\x43\x73\x73\x56\x61\x72\x73\x2c\x0a\x20\x20\x76\x4d\x6f\x64\x65\x6c\x43\x68\x65\x63\x6b\x62\x6f\x78\x2c\x0a\x20\x20\x76\x4d\x6f\x64\x65\x6c\x44\x79\x6e\x61\x6d\x69\x63\x2c\x0a\x20\x20\x76\x4d\x6f\x64\x65\x6c\x52\x61\x64\x69\x6f\x2c\x0a\x20\x20\x76\x4d\x6f\x64\x65\x6c\x53\x65\x6c\x65\x63\x74\x2c\x0a\x20\x20\x76\x4d\x6f\x64\x65\x6c\x54\x65\x78\x74\x2c\x0a\x20\x20\x76\x53\x68\x6f\x77\x2c\x0a\x20\x20\x77\x69\x74\x68\x4b\x65\x79\x73\x2c\x0a\x20\x20\x77\x69\x74\x68\x4d\x6f\x64\x69\x66\x69\x65\x72\x73\x0a\x7d\x2c\x20\x53\x79\x6d\x62\x6f\x6c\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x54\x61\x67\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x3a\x20\x22\x4d\x6f\x64\x75\x6c\x65\x22\x20\x7d\x29\x29\x3b\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x44\x65\x66\x61\x75\x6c\x74\x45\x78\x70\x6f\x72\x74\x46\x72\x6f\x6d\x43\x6a\x73\x28\x78\x29\x20\x7b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x78\x20\x26\x26\x20\x78\x2e\x5f\x5f\x65\x73\x4d\x6f\x64\x75\x6c\x65\x20\x26\x26\x20\x4f\x62\x6a\x65\x63\x74\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x2e\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x2e\x63\x61\x6c\x6c\x28\x78\x2c\x20\x22\x64\x65\x66\x61\x75\x6c\x74\x22\x29\x20\x3f\x20\x78\x5b\x22\x64\x65\x66\x61\x75\x6c\x74\x22\x5d\x20\x3a\x20\x78\x3b\x0a\x7d\x0a\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x65\x74\x41\x75\x67\x6d\x65\x6e\x74\x65\x64\x4e\x61\x6d\x65\x73\x70\x61\x63\x65\x28\x6e\x29\x20\x7b\x0a\x20\x20\x69\x66\x20\x28\x6e\x2e\x5f\x5f\x65\x73\x4d\x6f\x64\x75\x6c\x65\x29\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x3b\x0a\x20\x20\x76\x61\x72\x20\x61\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x7b\x7d\x2c\x20\x22\x5f\x5f\x65\x73\x4d\x6f\x64\x75\x6c\x65\x22\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x3a\x20\x74\x72\x75\x65\x20\x7d\x29\x3b\x0a\x20\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x6e\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x6b\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x61\x72\x20\x64\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x67\x65\x74\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x44\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x28\x6e\x2c\x20\x6b\x29\x3b\x0a\x20\x20\x20\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x61\x2c\x20\x6b\x2c\x20\x64\x2e\x67\x65\x74\x20\x3f\x20\x64\x20\x3a\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x0a\x20\x20\x20\x20\x20\x20\x67\x65\x74\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x5b\x6b\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x7d\x29\x3b\x0a\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x3b\x0a\x7d\x0a\x76\x61\x72\x20\x76\x75\x65\x33\x41\x70\x65\x78\x63\x68\x61\x72\x74\x73\x5f\x63\x6f\x6d\x6d\x6f\x6e\x20\x3d\x20\x7b\x20\x65\x78\x70\x6f\x72\x74\x73\x3a\x20\x7b\x7d\x20\x7d\x3b\x0a\x76\x61\x72\x20\x72\x65\x71\x75\x69\x72\x65\x24\x24\x30\x20\x3d\x20\x2f\x2a\x20\x40\x5f\x5f\x50\x55\x52\x45\x5f\x5f\x20\x2a\x2f\x20\x67\x65\x74\x41\x75\x67\x6d\x65\x6e\x74\x65\x64\x4e\x61\x6d\x65\x73\x70\x61\x63\x65\x28\x76\x75\x65\x5f\x72\x75\x6e\x74\x69\x6d\x65\x5f\x65\x73\x6d\x42\x75\x6e\x64\x6c\x65\x72\x29\x3b\x0a\x76\x61\x72\x20\x61\x70\x65\x78\x63\x68\x61\x72\x74\x73\x5f\x63\x6f\x6d\x6d\x6f\x6e\x20\x3d\x20\x7b\x20\x65\x78\x70\x6f\x72\x74\x73\x3a\x20\x7b\x7d\x20\x7d\x3b\x0a\x2f\x2a\x21\x0a\x20\x2a\x20\x41\x70\x65\x78\x43\x68\x61\x72\x74\x73\x20\x76\x33\x2e\x33\x35\x2e\x33\x0a\x20\x2a\x20\x28\x63\x29\x20\x32\x30\x31\x38\x2d\x32\x30\x32\x32\x20\x41\x70\x65\x78\x43\x68\x61\x72\x74\x73\x0a\x20\x2a\x20\x52\x65\x6c\x65\x61\x73\x65\x64\x20\x75\x6e\x64\x65\x72\x20\x74\x68\x65\x20\x4d\x49\x54\x20\x4c\x69\x63\x65\x6e\x73\x65\x2e\x0a\x20\x2a\x2f\x0a\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x6d\x6f\x64\x75\x6c\x65\x2c\x20\x65\x78\x70\x6f\x72\x74\x73\x29\x20\x7b\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x74\x32\x29\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x4f\x62\x6a\x65\x63\x74\x2e\x67\x65\x74\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x53\x79\x6d\x62\x6f\x6c\x73\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x67\x65\x74\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x53\x79\x6d\x62\x6f\x6c\x73\x28\x74\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x32\x20\x26\x26\x20\x28\x61\x32\x20\x3d\x20\x61\x32\x2e\x66\x69\x6c\x74\x65\x72\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x65\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x4f\x62\x6a\x65\x63\x74\x2e\x67\x65\x74\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x44\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x28\x74\x32\x2c\x20\x65\x33\x29\x2e\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x29\x2c\x20\x69\x32\x2e\x70\x75\x73\x68\x2e\x61\x70\x70\x6c\x79\x28\x69\x32\x2c\x20\x61\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x32\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x65\x28\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x31\x3b\x20\x69\x32\x20\x3c\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x32\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x69\x32\x5d\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x69\x32\x5d\x20\x3a\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x32\x20\x25\x20\x32\x20\x3f\x20\x74\x28\x4f\x62\x6a\x65\x63\x74\x28\x61\x32\x29\x2c\x20\x74\x72\x75\x65\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x28\x65\x32\x2c\x20\x74\x32\x2c\x20\x61\x32\x5b\x74\x32\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x20\x3a\x20\x4f\x62\x6a\x65\x63\x74\x2e\x67\x65\x74\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x44\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x73\x20\x3f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x69\x65\x73\x28\x65\x32\x2c\x20\x4f\x62\x6a\x65\x63\x74\x2e\x67\x65\x74\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x44\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x73\x28\x61\x32\x29\x29\x20\x3a\x20\x74\x28\x4f\x62\x6a\x65\x63\x74\x28\x61\x32\x29\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x65\x32\x2c\x20\x74\x32\x2c\x20\x4f\x62\x6a\x65\x63\x74\x2e\x67\x65\x74\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x44\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x28\x61\x32\x2c\x20\x74\x32\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x32\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x69\x28\x74\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x69\x20\x3d\x20\x74\x79\x70\x65\x6f\x66\x20\x53\x79\x6d\x62\x6f\x6c\x20\x3d\x3d\x20\x22\x66\x75\x6e\x63\x74\x69\x6f\x6e\x22\x20\x26\x26\x20\x74\x79\x70\x65\x6f\x66\x20\x53\x79\x6d\x62\x6f\x6c\x2e\x69\x74\x65\x72\x61\x74\x6f\x72\x20\x3d\x3d\x20\x22\x73\x79\x6d\x62\x6f\x6c\x22\x20\x3f\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x79\x70\x65\x6f\x66\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x7d\x20\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x20\x26\x26\x20\x74\x79\x70\x65\x6f\x66\x20\x53\x79\x6d\x62\x6f\x6c\x20\x3d\x3d\x20\x22\x66\x75\x6e\x63\x74\x69\x6f\x6e\x22\x20\x26\x26\x20\x74\x33\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x20\x3d\x3d\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x20\x26\x26\x20\x74\x33\x20\x21\x3d\x3d\x20\x53\x79\x6d\x62\x6f\x6c\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x20\x3f\x20\x22\x73\x79\x6d\x62\x6f\x6c\x22\x20\x3a\x20\x74\x79\x70\x65\x6f\x66\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x7d\x29\x28\x74\x32\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x61\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x21\x28\x74\x32\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x6f\x66\x20\x65\x32\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x72\x6f\x77\x20\x6e\x65\x77\x20\x54\x79\x70\x65\x45\x72\x72\x6f\x72\x28\x22\x43\x61\x6e\x6e\x6f\x74\x20\x63\x61\x6c\x6c\x20\x61\x20\x63\x6c\x61\x73\x73\x20\x61\x73\x20\x61\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x22\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x73\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x30\x3b\x20\x69\x32\x20\x3c\x20\x65\x32\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x32\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x65\x32\x5b\x69\x32\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x61\x32\x2e\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65\x20\x3d\x20\x61\x32\x2e\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65\x20\x7c\x7c\x20\x66\x61\x6c\x73\x65\x2c\x20\x61\x32\x2e\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x62\x6c\x65\x20\x3d\x20\x74\x72\x75\x65\x2c\x20\x22\x76\x61\x6c\x75\x65\x22\x20\x69\x6e\x20\x61\x32\x20\x26\x26\x20\x28\x61\x32\x2e\x77\x72\x69\x74\x61\x62\x6c\x65\x20\x3d\x20\x74\x72\x75\x65\x29\x2c\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x74\x32\x2c\x20\x61\x32\x2e\x6b\x65\x79\x2c\x20\x61\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x72\x28\x74\x32\x2c\x20\x65\x32\x2c\x20\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x32\x20\x26\x26\x20\x73\x28\x74\x32\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x2c\x20\x65\x32\x29\x2c\x20\x69\x32\x20\x26\x26\x20\x73\x28\x74\x32\x2c\x20\x69\x32\x29\x2c\x20\x74\x32\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6f\x28\x74\x32\x2c\x20\x65\x32\x2c\x20\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x32\x20\x69\x6e\x20\x74\x32\x20\x3f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x74\x32\x2c\x20\x65\x32\x2c\x20\x7b\x20\x76\x61\x6c\x75\x65\x3a\x20\x69\x32\x2c\x20\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x20\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x20\x77\x72\x69\x74\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x20\x7d\x29\x20\x3a\x20\x74\x32\x5b\x65\x32\x5d\x20\x3d\x20\x69\x32\x2c\x20\x74\x32\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6e\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x65\x32\x20\x21\x3d\x20\x22\x66\x75\x6e\x63\x74\x69\x6f\x6e\x22\x20\x26\x26\x20\x65\x32\x20\x21\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x72\x6f\x77\x20\x6e\x65\x77\x20\x54\x79\x70\x65\x45\x72\x72\x6f\x72\x28\x22\x53\x75\x70\x65\x72\x20\x65\x78\x70\x72\x65\x73\x73\x69\x6f\x6e\x20\x6d\x75\x73\x74\x20\x65\x69\x74\x68\x65\x72\x20\x62\x65\x20\x6e\x75\x6c\x6c\x20\x6f\x72\x20\x61\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x22\x29\x3b\x0a\x20\x20\x20\x20\x74\x32\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x63\x72\x65\x61\x74\x65\x28\x65\x32\x20\x26\x26\x20\x65\x32\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x2c\x20\x7b\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x3a\x20\x7b\x20\x76\x61\x6c\x75\x65\x3a\x20\x74\x32\x2c\x20\x77\x72\x69\x74\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x2c\x20\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x62\x6c\x65\x3a\x20\x74\x72\x75\x65\x20\x7d\x20\x7d\x29\x2c\x20\x65\x32\x20\x26\x26\x20\x68\x32\x28\x74\x32\x2c\x20\x65\x32\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x6c\x28\x74\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x6c\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x50\x72\x6f\x74\x6f\x74\x79\x70\x65\x4f\x66\x20\x3f\x20\x4f\x62\x6a\x65\x63\x74\x2e\x67\x65\x74\x50\x72\x6f\x74\x6f\x74\x79\x70\x65\x4f\x66\x20\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x2e\x5f\x5f\x70\x72\x6f\x74\x6f\x5f\x5f\x20\x7c\x7c\x20\x4f\x62\x6a\x65\x63\x74\x2e\x67\x65\x74\x50\x72\x6f\x74\x6f\x74\x79\x70\x65\x4f\x66\x28\x74\x33\x29\x3b\x0a\x20\x20\x20\x20\x7d\x29\x28\x74\x32\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x68\x32\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x68\x32\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x73\x65\x74\x50\x72\x6f\x74\x6f\x74\x79\x70\x65\x4f\x66\x20\x7c\x7c\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x2e\x5f\x5f\x70\x72\x6f\x74\x6f\x5f\x5f\x20\x3d\x20\x65\x33\x2c\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x7d\x29\x28\x74\x32\x2c\x20\x65\x32\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x65\x32\x20\x26\x26\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x65\x32\x20\x3d\x3d\x20\x22\x6f\x62\x6a\x65\x63\x74\x22\x20\x7c\x7c\x20\x74\x79\x70\x65\x6f\x66\x20\x65\x32\x20\x3d\x3d\x20\x22\x66\x75\x6e\x63\x74\x69\x6f\x6e\x22\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x32\x3b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x65\x32\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x29\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x72\x6f\x77\x20\x6e\x65\x77\x20\x54\x79\x70\x65\x45\x72\x72\x6f\x72\x28\x22\x44\x65\x72\x69\x76\x65\x64\x20\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x73\x20\x6d\x61\x79\x20\x6f\x6e\x6c\x79\x20\x72\x65\x74\x75\x72\x6e\x20\x6f\x62\x6a\x65\x63\x74\x20\x6f\x72\x20\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x33\x20\x3d\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x72\x6f\x77\x20\x6e\x65\x77\x20\x52\x65\x66\x65\x72\x65\x6e\x63\x65\x45\x72\x72\x6f\x72\x28\x22\x74\x68\x69\x73\x20\x68\x61\x73\x6e\x27\x74\x20\x62\x65\x65\x6e\x20\x69\x6e\x69\x74\x69\x61\x6c\x69\x73\x65\x64\x20\x2d\x20\x73\x75\x70\x65\x72\x28\x29\x20\x68\x61\x73\x6e\x27\x74\x20\x62\x65\x65\x6e\x20\x63\x61\x6c\x6c\x65\x64\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x7d\x28\x74\x32\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x64\x28\x74\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x76\x61\x72\x20\x65\x32\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x52\x65\x66\x6c\x65\x63\x74\x20\x3d\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x7c\x7c\x20\x21\x52\x65\x66\x6c\x65\x63\x74\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x52\x65\x66\x6c\x65\x63\x74\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x2e\x73\x68\x61\x6d\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x50\x72\x6f\x78\x79\x20\x3d\x3d\x20\x22\x66\x75\x6e\x63\x74\x69\x6f\x6e\x22\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x79\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x42\x6f\x6f\x6c\x65\x61\x6e\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x2e\x76\x61\x6c\x75\x65\x4f\x66\x2e\x63\x61\x6c\x6c\x28\x52\x65\x66\x6c\x65\x63\x74\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x28\x42\x6f\x6f\x6c\x65\x61\x6e\x2c\x20\x5b\x5d\x2c\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x29\x2c\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x63\x61\x74\x63\x68\x20\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x28\x29\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x2c\x20\x61\x32\x20\x3d\x20\x6c\x28\x74\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x73\x32\x20\x3d\x20\x6c\x28\x74\x68\x69\x73\x29\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x32\x20\x3d\x20\x52\x65\x66\x6c\x65\x63\x74\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x28\x61\x32\x2c\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2c\x20\x73\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x65\x6c\x73\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x32\x20\x3d\x20\x61\x32\x2e\x61\x70\x70\x6c\x79\x28\x74\x68\x69\x73\x2c\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x63\x28\x74\x68\x69\x73\x2c\x20\x69\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x67\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x41\x72\x72\x61\x79\x2e\x69\x73\x41\x72\x72\x61\x79\x28\x74\x33\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x7d\x28\x74\x32\x29\x20\x7c\x7c\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x74\x33\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x6e\x75\x6c\x6c\x20\x3a\x20\x74\x79\x70\x65\x6f\x66\x20\x53\x79\x6d\x62\x6f\x6c\x20\x21\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x26\x26\x20\x74\x33\x5b\x53\x79\x6d\x62\x6f\x6c\x2e\x69\x74\x65\x72\x61\x74\x6f\x72\x5d\x20\x7c\x7c\x20\x74\x33\x5b\x22\x40\x40\x69\x74\x65\x72\x61\x74\x6f\x72\x22\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x32\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x3b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x2c\x20\x73\x32\x2c\x20\x72\x32\x20\x3d\x20\x5b\x5d\x2c\x20\x6f\x32\x20\x3d\x20\x74\x72\x75\x65\x2c\x20\x6e\x32\x20\x3d\x20\x66\x61\x6c\x73\x65\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x72\x79\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x69\x32\x20\x3d\x20\x69\x32\x2e\x63\x61\x6c\x6c\x28\x74\x33\x29\x3b\x20\x21\x28\x6f\x32\x20\x3d\x20\x28\x61\x32\x20\x3d\x20\x69\x32\x2e\x6e\x65\x78\x74\x28\x29\x29\x2e\x64\x6f\x6e\x65\x29\x20\x26\x26\x20\x28\x72\x32\x2e\x70\x75\x73\x68\x28\x61\x32\x2e\x76\x61\x6c\x75\x65\x29\x2c\x20\x21\x65\x33\x20\x7c\x7c\x20\x72\x32\x2e\x6c\x65\x6e\x67\x74\x68\x20\x21\x3d\x3d\x20\x65\x33\x29\x3b\x20\x6f\x32\x20\x3d\x20\x74\x72\x75\x65\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x63\x61\x74\x63\x68\x20\x28\x74\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6e\x32\x20\x3d\x20\x74\x72\x75\x65\x2c\x20\x73\x32\x20\x3d\x20\x74\x34\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x20\x66\x69\x6e\x61\x6c\x6c\x79\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x72\x79\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x6f\x32\x20\x7c\x7c\x20\x69\x32\x2e\x72\x65\x74\x75\x72\x6e\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x7c\x7c\x20\x69\x32\x2e\x72\x65\x74\x75\x72\x6e\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x20\x66\x69\x6e\x61\x6c\x6c\x79\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x6e\x32\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x72\x6f\x77\x20\x73\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x32\x3b\x0a\x20\x20\x20\x20\x7d\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7c\x7c\x20\x66\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7c\x7c\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x72\x6f\x77\x20\x6e\x65\x77\x20\x54\x79\x70\x65\x45\x72\x72\x6f\x72\x28\x22\x49\x6e\x76\x61\x6c\x69\x64\x20\x61\x74\x74\x65\x6d\x70\x74\x20\x74\x6f\x20\x64\x65\x73\x74\x72\x75\x63\x74\x75\x72\x65\x20\x6e\x6f\x6e\x2d\x69\x74\x65\x72\x61\x62\x6c\x65\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x5c\x6e\x49\x6e\x20\x6f\x72\x64\x65\x72\x20\x74\x6f\x20\x62\x65\x20\x69\x74\x65\x72\x61\x62\x6c\x65\x2c\x20\x6e\x6f\x6e\x2d\x61\x72\x72\x61\x79\x20\x6f\x62\x6a\x65\x63\x74\x73\x20\x6d\x75\x73\x74\x20\x68\x61\x76\x65\x20\x61\x20\x5b\x53\x79\x6d\x62\x6f\x6c\x2e\x69\x74\x65\x72\x61\x74\x6f\x72\x5d\x28\x29\x20\x6d\x65\x74\x68\x6f\x64\x2e\x22\x29\x3b\x0a\x20\x20\x20\x20\x7d\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x75\x28\x74\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x41\x72\x72\x61\x79\x2e\x69\x73\x41\x72\x72\x61\x79\x28\x74\x33\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x32\x28\x74\x33\x29\x3b\x0a\x20\x20\x20\x20\x7d\x28\x74\x32\x29\x20\x7c\x7c\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x53\x79\x6d\x62\x6f\x6c\x20\x21\x3d\x20\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x20\x26\x26\x20\x74\x33\x5b\x53\x79\x6d\x62\x6f\x6c\x2e\x69\x74\x65\x72\x61\x74\x6f\x72\x5d\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x20\x7c\x7c\x20\x74\x33\x5b\x22\x40\x40\x69\x74\x65\x72\x61\x74\x6f\x72\x22\x5d\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x41\x72\x72\x61\x79\x2e\x66\x72\x6f\x6d\x28\x74\x33\x29\x3b\x0a\x20\x20\x20\x20\x7d\x28\x74\x32\x29\x20\x7c\x7c\x20\x66\x28\x74\x32\x29\x20\x7c\x7c\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x72\x6f\x77\x20\x6e\x65\x77\x20\x54\x79\x70\x65\x45\x72\x72\x6f\x72\x28\x22\x49\x6e\x76\x61\x6c\x69\x64\x20\x61\x74\x74\x65\x6d\x70\x74\x20\x74\x6f\x20\x73\x70\x72\x65\x61\x64\x20\x6e\x6f\x6e\x2d\x69\x74\x65\x72\x61\x62\x6c\x65\x20\x69\x6e\x73\x74\x61\x6e\x63\x65\x2e\x5c\x6e\x49\x6e\x20\x6f\x72\x64\x65\x72\x20\x74\x6f\x20\x62\x65\x20\x69\x74\x65\x72\x61\x62\x6c\x65\x2c\x20\x6e\x6f\x6e\x2d\x61\x72\x72\x61\x79\x20\x6f\x62\x6a\x65\x63\x74\x73\x20\x6d\x75\x73\x74\x20\x68\x61\x76\x65\x20\x61\x20\x5b\x53\x79\x6d\x62\x6f\x6c\x2e\x69\x74\x65\x72\x61\x74\x6f\x72\x5d\x28\x29\x20\x6d\x65\x74\x68\x6f\x64\x2e\x22\x29\x3b\x0a\x20\x20\x20\x20\x7d\x28\x29\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x69\x66\x20\x28\x74\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x79\x70\x65\x6f\x66\x20\x74\x32\x20\x3d\x3d\x20\x22\x73\x74\x72\x69\x6e\x67\x22\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x32\x28\x74\x32\x2c\x20\x65\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x2e\x63\x61\x6c\x6c\x28\x74\x32\x29\x2e\x73\x6c\x69\x63\x65\x28\x38\x2c\x20\x2d\x31\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x32\x20\x3d\x3d\x3d\x20\x22\x4f\x62\x6a\x65\x63\x74\x22\x20\x26\x26\x20\x74\x32\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x20\x26\x26\x20\x28\x69\x32\x20\x3d\x20\x74\x32\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x2e\x6e\x61\x6d\x65\x29\x2c\x20\x69\x32\x20\x3d\x3d\x3d\x20\x22\x4d\x61\x70\x22\x20\x7c\x7c\x20\x69\x32\x20\x3d\x3d\x3d\x20\x22\x53\x65\x74\x22\x20\x3f\x20\x41\x72\x72\x61\x79\x2e\x66\x72\x6f\x6d\x28\x74\x32\x29\x20\x3a\x20\x69\x32\x20\x3d\x3d\x3d\x20\x22\x41\x72\x67\x75\x6d\x65\x6e\x74\x73\x22\x20\x7c\x7c\x20\x2f\x5e\x28\x3f\x3a\x55\x69\x7c\x49\x29\x6e\x74\x28\x3f\x3a\x38\x7c\x31\x36\x7c\x33\x32\x29\x28\x3f\x3a\x43\x6c\x61\x6d\x70\x65\x64\x29\x3f\x41\x72\x72\x61\x79\x24\x2f\x2e\x74\x65\x73\x74\x28\x69\x32\x29\x20\x3f\x20\x70\x32\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x3a\x20\x76\x6f\x69\x64\x20\x30\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x7d\x0a\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x70\x32\x28\x74\x32\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x28\x65\x32\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x7c\x7c\x20\x65\x32\x20\x3e\x20\x74\x32\x2e\x6c\x65\x6e\x67\x74\x68\x29\x20\x26\x26\x20\x28\x65\x32\x20\x3d\x20\x74\x32\x2e\x6c\x65\x6e\x67\x74\x68\x29\x3b\x0a\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x30\x2c\x20\x61\x32\x20\x3d\x20\x6e\x65\x77\x20\x41\x72\x72\x61\x79\x28\x65\x32\x29\x3b\x20\x69\x32\x20\x3c\x20\x65\x32\x3b\x20\x69\x32\x2b\x2b\x29\x0a\x20\x20\x20\x20\x20\x20\x61\x32\x5b\x69\x32\x5d\x20\x3d\x20\x74\x32\x5b\x69\x32\x5d\x3b\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x32\x3b\x0a\x20\x20\x7d\x0a\x20\x20\x76\x61\x72\x20\x78\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x32\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x28\x74\x68\x69\x73\x2c\x20\x74\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x28\x74\x32\x2c\x20\x5b\x7b\x20\x6b\x65\x79\x3a\x20\x22\x73\x68\x61\x64\x65\x52\x47\x42\x43\x6f\x6c\x6f\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x65\x32\x2e\x73\x70\x6c\x69\x74\x28\x22\x2c\x22\x29\x2c\x20\x61\x32\x20\x3d\x20\x74\x33\x20\x3c\x20\x30\x20\x3f\x20\x30\x20\x3a\x20\x32\x35\x35\x2c\x20\x73\x32\x20\x3d\x20\x74\x33\x20\x3c\x20\x30\x20\x3f\x20\x2d\x31\x20\x2a\x20\x74\x33\x20\x3a\x20\x74\x33\x2c\x20\x72\x32\x20\x3d\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x69\x32\x5b\x30\x5d\x2e\x73\x6c\x69\x63\x65\x28\x34\x29\x2c\x20\x31\x30\x29\x2c\x20\x6f\x32\x20\x3d\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x69\x32\x5b\x31\x5d\x2c\x20\x31\x30\x29\x2c\x20\x6e\x32\x20\x3d\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x69\x32\x5b\x32\x5d\x2c\x20\x31\x30\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x22\x72\x67\x62\x28\x22\x20\x2b\x20\x28\x4d\x61\x74\x68\x2e\x72\x6f\x75\x6e\x64\x28\x28\x61\x32\x20\x2d\x20\x72\x32\x29\x20\x2a\x20\x73\x32\x29\x20\x2b\x20\x72\x32\x29\x20\x2b\x20\x22\x2c\x22\x20\x2b\x20\x28\x4d\x61\x74\x68\x2e\x72\x6f\x75\x6e\x64\x28\x28\x61\x32\x20\x2d\x20\x6f\x32\x29\x20\x2a\x20\x73\x32\x29\x20\x2b\x20\x6f\x32\x29\x20\x2b\x20\x22\x2c\x22\x20\x2b\x20\x28\x4d\x61\x74\x68\x2e\x72\x6f\x75\x6e\x64\x28\x28\x61\x32\x20\x2d\x20\x6e\x32\x29\x20\x2a\x20\x73\x32\x29\x20\x2b\x20\x6e\x32\x29\x20\x2b\x20\x22\x29\x22\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x73\x68\x61\x64\x65\x48\x65\x78\x43\x6f\x6c\x6f\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x65\x32\x2e\x73\x6c\x69\x63\x65\x28\x31\x29\x2c\x20\x31\x36\x29\x2c\x20\x61\x32\x20\x3d\x20\x74\x33\x20\x3c\x20\x30\x20\x3f\x20\x30\x20\x3a\x20\x32\x35\x35\x2c\x20\x73\x32\x20\x3d\x20\x74\x33\x20\x3c\x20\x30\x20\x3f\x20\x2d\x31\x20\x2a\x20\x74\x33\x20\x3a\x20\x74\x33\x2c\x20\x72\x32\x20\x3d\x20\x69\x32\x20\x3e\x3e\x20\x31\x36\x2c\x20\x6f\x32\x20\x3d\x20\x69\x32\x20\x3e\x3e\x20\x38\x20\x26\x20\x32\x35\x35\x2c\x20\x6e\x32\x20\x3d\x20\x32\x35\x35\x20\x26\x20\x69\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x22\x23\x22\x20\x2b\x20\x28\x31\x36\x37\x37\x37\x32\x31\x36\x20\x2b\x20\x36\x35\x35\x33\x36\x20\x2a\x20\x28\x4d\x61\x74\x68\x2e\x72\x6f\x75\x6e\x64\x28\x28\x61\x32\x20\x2d\x20\x72\x32\x29\x20\x2a\x20\x73\x32\x29\x20\x2b\x20\x72\x32\x29\x20\x2b\x20\x32\x35\x36\x20\x2a\x20\x28\x4d\x61\x74\x68\x2e\x72\x6f\x75\x6e\x64\x28\x28\x61\x32\x20\x2d\x20\x6f\x32\x29\x20\x2a\x20\x73\x32\x29\x20\x2b\x20\x6f\x32\x29\x20\x2b\x20\x28\x4d\x61\x74\x68\x2e\x72\x6f\x75\x6e\x64\x28\x28\x61\x32\x20\x2d\x20\x6e\x32\x29\x20\x2a\x20\x73\x32\x29\x20\x2b\x20\x6e\x32\x29\x29\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x28\x31\x36\x29\x2e\x73\x6c\x69\x63\x65\x28\x31\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x73\x68\x61\x64\x65\x43\x6f\x6c\x6f\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x65\x32\x2c\x20\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x32\x2e\x69\x73\x43\x6f\x6c\x6f\x72\x48\x65\x78\x28\x69\x32\x29\x20\x3f\x20\x74\x68\x69\x73\x2e\x73\x68\x61\x64\x65\x48\x65\x78\x43\x6f\x6c\x6f\x72\x28\x65\x32\x2c\x20\x69\x32\x29\x20\x3a\x20\x74\x68\x69\x73\x2e\x73\x68\x61\x64\x65\x52\x47\x42\x43\x6f\x6c\x6f\x72\x28\x65\x32\x2c\x20\x69\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x5d\x2c\x20\x5b\x7b\x20\x6b\x65\x79\x3a\x20\x22\x62\x69\x6e\x64\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x2e\x61\x70\x70\x6c\x79\x28\x65\x32\x2c\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x69\x73\x4f\x62\x6a\x65\x63\x74\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x20\x26\x26\x20\x69\x28\x74\x33\x29\x20\x3d\x3d\x3d\x20\x22\x6f\x62\x6a\x65\x63\x74\x22\x20\x26\x26\x20\x21\x41\x72\x72\x61\x79\x2e\x69\x73\x41\x72\x72\x61\x79\x28\x74\x33\x29\x20\x26\x26\x20\x74\x33\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x69\x73\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x4f\x62\x6a\x65\x63\x74\x2e\x70\x72\x6f\x74\x6f\x74\x79\x70\x65\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x2e\x63\x61\x6c\x6c\x28\x65\x32\x29\x20\x3d\x3d\x3d\x20\x22\x5b\x6f\x62\x6a\x65\x63\x74\x20\x22\x20\x2b\x20\x74\x33\x20\x2b\x20\x22\x5d\x22\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x6c\x69\x73\x74\x54\x6f\x41\x72\x72\x61\x79\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x65\x32\x2c\x20\x69\x32\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x65\x32\x20\x3d\x20\x30\x3b\x20\x65\x32\x20\x3c\x20\x74\x33\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x65\x32\x2b\x2b\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x32\x5b\x65\x32\x5d\x20\x3d\x20\x74\x33\x5b\x65\x32\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x65\x78\x74\x65\x6e\x64\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x74\x68\x69\x73\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x79\x70\x65\x6f\x66\x20\x4f\x62\x6a\x65\x63\x74\x2e\x61\x73\x73\x69\x67\x6e\x20\x21\x3d\x20\x22\x66\x75\x6e\x63\x74\x69\x6f\x6e\x22\x20\x26\x26\x20\x28\x4f\x62\x6a\x65\x63\x74\x2e\x61\x73\x73\x69\x67\x6e\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x34\x20\x3d\x3d\x20\x6e\x75\x6c\x6c\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x72\x6f\x77\x20\x6e\x65\x77\x20\x54\x79\x70\x65\x45\x72\x72\x6f\x72\x28\x22\x43\x61\x6e\x6e\x6f\x74\x20\x63\x6f\x6e\x76\x65\x72\x74\x20\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x20\x6f\x72\x20\x6e\x75\x6c\x6c\x20\x74\x6f\x20\x6f\x62\x6a\x65\x63\x74\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x65\x33\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x28\x74\x34\x29\x2c\x20\x69\x33\x20\x3d\x20\x31\x3b\x20\x69\x33\x20\x3c\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x69\x33\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x33\x20\x3d\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x69\x33\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x61\x33\x20\x21\x3d\x20\x6e\x75\x6c\x6c\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x73\x32\x20\x69\x6e\x20\x61\x33\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x33\x2e\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x73\x32\x29\x20\x26\x26\x20\x28\x65\x33\x5b\x73\x32\x5d\x20\x3d\x20\x61\x33\x5b\x73\x32\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x33\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x4f\x62\x6a\x65\x63\x74\x2e\x61\x73\x73\x69\x67\x6e\x28\x7b\x7d\x2c\x20\x74\x33\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x2e\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x74\x33\x29\x20\x26\x26\x20\x74\x68\x69\x73\x2e\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x65\x32\x29\x20\x26\x26\x20\x4f\x62\x6a\x65\x63\x74\x2e\x6b\x65\x79\x73\x28\x65\x32\x29\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x73\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x32\x2e\x69\x73\x4f\x62\x6a\x65\x63\x74\x28\x65\x32\x5b\x73\x32\x5d\x29\x20\x26\x26\x20\x73\x32\x20\x69\x6e\x20\x74\x33\x20\x3f\x20\x61\x32\x5b\x73\x32\x5d\x20\x3d\x20\x69\x32\x2e\x65\x78\x74\x65\x6e\x64\x28\x74\x33\x5b\x73\x32\x5d\x2c\x20\x65\x32\x5b\x73\x32\x5d\x29\x20\x3a\x20\x4f\x62\x6a\x65\x63\x74\x2e\x61\x73\x73\x69\x67\x6e\x28\x61\x32\x2c\x20\x6f\x28\x7b\x7d\x2c\x20\x73\x32\x2c\x20\x65\x32\x5b\x73\x32\x5d\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x2c\x20\x61\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x65\x78\x74\x65\x6e\x64\x41\x72\x72\x61\x79\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x65\x32\x2c\x20\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x5b\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x32\x2e\x6d\x61\x70\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x65\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x61\x32\x2e\x70\x75\x73\x68\x28\x74\x32\x2e\x65\x78\x74\x65\x6e\x64\x28\x69\x32\x2c\x20\x65\x33\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x2c\x20\x65\x32\x20\x3d\x20\x61\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x6d\x6f\x6e\x74\x68\x4d\x6f\x64\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x20\x25\x20\x31\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x63\x6c\x6f\x6e\x65\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x32\x2e\x69\x73\x28\x22\x41\x72\x72\x61\x79\x22\x2c\x20\x65\x32\x29\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x5b\x5d\x2c\x20\x73\x32\x20\x3d\x20\x30\x3b\x20\x73\x32\x20\x3c\x20\x65\x32\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x73\x32\x2b\x2b\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x61\x32\x5b\x73\x32\x5d\x20\x3d\x20\x74\x68\x69\x73\x2e\x63\x6c\x6f\x6e\x65\x28\x65\x32\x5b\x73\x32\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x32\x2e\x69\x73\x28\x22\x4e\x75\x6c\x6c\x22\x2c\x20\x65\x32\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x32\x2e\x69\x73\x28\x22\x44\x61\x74\x65\x22\x2c\x20\x65\x32\x29\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x28\x65\x32\x29\x20\x3d\x3d\x3d\x20\x22\x6f\x62\x6a\x65\x63\x74\x22\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x72\x32\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x6f\x32\x20\x69\x6e\x20\x65\x32\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x32\x2e\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x6f\x32\x29\x20\x26\x26\x20\x28\x72\x32\x5b\x6f\x32\x5d\x20\x3d\x20\x74\x68\x69\x73\x2e\x63\x6c\x6f\x6e\x65\x28\x65\x32\x5b\x6f\x32\x5d\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x6c\x6f\x67\x31\x30\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x4d\x61\x74\x68\x2e\x6c\x6f\x67\x28\x74\x33\x29\x20\x2f\x20\x4d\x61\x74\x68\x2e\x4c\x4e\x31\x30\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x72\x6f\x75\x6e\x64\x54\x6f\x42\x61\x73\x65\x31\x30\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x4d\x61\x74\x68\x2e\x70\x6f\x77\x28\x31\x30\x2c\x20\x4d\x61\x74\x68\x2e\x66\x6c\x6f\x6f\x72\x28\x4d\x61\x74\x68\x2e\x6c\x6f\x67\x31\x30\x28\x74\x33\x29\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x72\x6f\x75\x6e\x64\x54\x6f\x42\x61\x73\x65\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x4d\x61\x74\x68\x2e\x70\x6f\x77\x28\x65\x32\x2c\x20\x4d\x61\x74\x68\x2e\x66\x6c\x6f\x6f\x72\x28\x4d\x61\x74\x68\x2e\x6c\x6f\x67\x28\x74\x33\x29\x20\x2f\x20\x4d\x61\x74\x68\x2e\x6c\x6f\x67\x28\x65\x32\x29\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x70\x61\x72\x73\x65\x4e\x75\x6d\x62\x65\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x20\x3d\x3d\x3d\x20\x6e\x75\x6c\x6c\x20\x3f\x20\x74\x33\x20\x3a\x20\x70\x61\x72\x73\x65\x46\x6c\x6f\x61\x74\x28\x74\x33\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x72\x61\x6e\x64\x6f\x6d\x49\x64\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x4d\x61\x74\x68\x2e\x72\x61\x6e\x64\x6f\x6d\x28\x29\x20\x2b\x20\x31\x29\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x28\x33\x36\x29\x2e\x73\x75\x62\x73\x74\x72\x69\x6e\x67\x28\x34\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x6e\x6f\x45\x78\x70\x6f\x6e\x65\x6e\x74\x73\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x65\x32\x20\x3d\x20\x53\x74\x72\x69\x6e\x67\x28\x74\x33\x29\x2e\x73\x70\x6c\x69\x74\x28\x2f\x5b\x65\x45\x5d\x2f\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x32\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x3d\x3d\x20\x31\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x32\x5b\x30\x5d\x3b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x22\x22\x2c\x20\x61\x32\x20\x3d\x20\x74\x33\x20\x3c\x20\x30\x20\x3f\x20\x22\x2d\x22\x20\x3a\x20\x22\x22\x2c\x20\x73\x32\x20\x3d\x20\x65\x32\x5b\x30\x5d\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x22\x2e\x22\x2c\x20\x22\x22\x29\x2c\x20\x72\x32\x20\x3d\x20\x4e\x75\x6d\x62\x65\x72\x28\x65\x32\x5b\x31\x5d\x29\x20\x2b\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x72\x32\x20\x3c\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x69\x32\x20\x3d\x20\x61\x32\x20\x2b\x20\x22\x30\x2e\x22\x3b\x20\x72\x32\x2b\x2b\x3b\x20\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x32\x20\x2b\x3d\x20\x22\x30\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x32\x20\x2b\x20\x73\x32\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x2f\x5e\x2d\x2f\x2c\x20\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x72\x32\x20\x2d\x3d\x20\x73\x32\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x72\x32\x2d\x2d\x3b\x20\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x32\x20\x2b\x3d\x20\x22\x30\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x32\x20\x2b\x20\x69\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x67\x65\x74\x44\x69\x6d\x65\x6e\x73\x69\x6f\x6e\x73\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x65\x32\x20\x3d\x20\x67\x65\x74\x43\x6f\x6d\x70\x75\x74\x65\x64\x53\x74\x79\x6c\x65\x28\x74\x33\x2c\x20\x6e\x75\x6c\x6c\x29\x2c\x20\x69\x32\x20\x3d\x20\x74\x33\x2e\x63\x6c\x69\x65\x6e\x74\x48\x65\x69\x67\x68\x74\x2c\x20\x61\x32\x20\x3d\x20\x74\x33\x2e\x63\x6c\x69\x65\x6e\x74\x57\x69\x64\x74\x68\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x32\x20\x2d\x3d\x20\x70\x61\x72\x73\x65\x46\x6c\x6f\x61\x74\x28\x65\x32\x2e\x70\x61\x64\x64\x69\x6e\x67\x54\x6f\x70\x29\x20\x2b\x20\x70\x61\x72\x73\x65\x46\x6c\x6f\x61\x74\x28\x65\x32\x2e\x70\x61\x64\x64\x69\x6e\x67\x42\x6f\x74\x74\x6f\x6d\x29\x2c\x20\x5b\x61\x32\x20\x2d\x3d\x20\x70\x61\x72\x73\x65\x46\x6c\x6f\x61\x74\x28\x65\x32\x2e\x70\x61\x64\x64\x69\x6e\x67\x4c\x65\x66\x74\x29\x20\x2b\x20\x70\x61\x72\x73\x65\x46\x6c\x6f\x61\x74\x28\x65\x32\x2e\x70\x61\x64\x64\x69\x6e\x67\x52\x69\x67\x68\x74\x29\x2c\x20\x69\x32\x5d\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x67\x65\x74\x42\x6f\x75\x6e\x64\x69\x6e\x67\x43\x6c\x69\x65\x6e\x74\x52\x65\x63\x74\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x65\x32\x20\x3d\x20\x74\x33\x2e\x67\x65\x74\x42\x6f\x75\x6e\x64\x69\x6e\x67\x43\x6c\x69\x65\x6e\x74\x52\x65\x63\x74\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x20\x74\x6f\x70\x3a\x20\x65\x32\x2e\x74\x6f\x70\x2c\x20\x72\x69\x67\x68\x74\x3a\x20\x65\x32\x2e\x72\x69\x67\x68\x74\x2c\x20\x62\x6f\x74\x74\x6f\x6d\x3a\x20\x65\x32\x2e\x62\x6f\x74\x74\x6f\x6d\x2c\x20\x6c\x65\x66\x74\x3a\x20\x65\x32\x2e\x6c\x65\x66\x74\x2c\x20\x77\x69\x64\x74\x68\x3a\x20\x74\x33\x2e\x63\x6c\x69\x65\x6e\x74\x57\x69\x64\x74\x68\x2c\x20\x68\x65\x69\x67\x68\x74\x3a\x20\x74\x33\x2e\x63\x6c\x69\x65\x6e\x74\x48\x65\x69\x67\x68\x74\x2c\x20\x78\x3a\x20\x65\x32\x2e\x6c\x65\x66\x74\x2c\x20\x79\x3a\x20\x65\x32\x2e\x74\x6f\x70\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x67\x65\x74\x4c\x61\x72\x67\x65\x73\x74\x53\x74\x72\x69\x6e\x67\x46\x72\x6f\x6d\x41\x72\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x2e\x72\x65\x64\x75\x63\x65\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x34\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x41\x72\x72\x61\x79\x2e\x69\x73\x41\x72\x72\x61\x79\x28\x65\x32\x29\x20\x26\x26\x20\x28\x65\x32\x20\x3d\x20\x65\x32\x2e\x72\x65\x64\x75\x63\x65\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x35\x2c\x20\x65\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x35\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x65\x33\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3f\x20\x74\x35\x20\x3a\x20\x65\x33\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x29\x29\x2c\x20\x74\x34\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x65\x32\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3f\x20\x74\x34\x20\x3a\x20\x65\x32\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x2c\x20\x30\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x68\x65\x78\x54\x6f\x52\x67\x62\x61\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x74\x33\x20\x3d\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x30\x20\x26\x26\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x30\x5d\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x30\x5d\x20\x3a\x20\x22\x23\x39\x39\x39\x39\x39\x39\x22\x2c\x20\x65\x32\x20\x3d\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x31\x20\x26\x26\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x31\x5d\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x31\x5d\x20\x3a\x20\x30\x2e\x36\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x73\x75\x62\x73\x74\x72\x69\x6e\x67\x28\x30\x2c\x20\x31\x29\x20\x21\x3d\x3d\x20\x22\x23\x22\x20\x26\x26\x20\x28\x74\x33\x20\x3d\x20\x22\x23\x39\x39\x39\x39\x39\x39\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x74\x33\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x22\x23\x22\x2c\x20\x22\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x32\x20\x3d\x20\x69\x32\x2e\x6d\x61\x74\x63\x68\x28\x6e\x65\x77\x20\x52\x65\x67\x45\x78\x70\x28\x22\x28\x2e\x7b\x22\x20\x2b\x20\x69\x32\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2f\x20\x33\x20\x2b\x20\x22\x7d\x29\x22\x2c\x20\x22\x67\x22\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x30\x3b\x20\x61\x32\x20\x3c\x20\x69\x32\x2e\x6c\x65\x6e\x67\x74\x68\x3b\x20\x61\x32\x2b\x2b\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x69\x32\x5b\x61\x32\x5d\x20\x3d\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x69\x32\x5b\x61\x32\x5d\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x3d\x3d\x20\x31\x20\x3f\x20\x69\x32\x5b\x61\x32\x5d\x20\x2b\x20\x69\x32\x5b\x61\x32\x5d\x20\x3a\x20\x69\x32\x5b\x61\x32\x5d\x2c\x20\x31\x36\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x65\x32\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x26\x26\x20\x69\x32\x2e\x70\x75\x73\x68\x28\x65\x32\x29\x2c\x20\x22\x72\x67\x62\x61\x28\x22\x20\x2b\x20\x69\x32\x2e\x6a\x6f\x69\x6e\x28\x22\x2c\x22\x29\x20\x2b\x20\x22\x29\x22\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x67\x65\x74\x4f\x70\x61\x63\x69\x74\x79\x46\x72\x6f\x6d\x52\x47\x42\x41\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x61\x72\x73\x65\x46\x6c\x6f\x61\x74\x28\x74\x33\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x2f\x5e\x2e\x2a\x2c\x28\x2e\x2b\x29\x5c\x29\x2f\x2c\x20\x22\x24\x31\x22\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x72\x67\x62\x32\x68\x65\x78\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x74\x33\x20\x3d\x20\x74\x33\x2e\x6d\x61\x74\x63\x68\x28\x2f\x5e\x72\x67\x62\x61\x3f\x5b\x5c\x73\x2b\x5d\x3f\x5c\x28\x5b\x5c\x73\x2b\x5d\x3f\x28\x5c\x64\x2b\x29\x5b\x5c\x73\x2b\x5d\x3f\x2c\x5b\x5c\x73\x2b\x5d\x3f\x28\x5c\x64\x2b\x29\x5b\x5c\x73\x2b\x5d\x3f\x2c\x5b\x5c\x73\x2b\x5d\x3f\x28\x5c\x64\x2b\x29\x5b\x5c\x73\x2b\x5d\x3f\x2f\x69\x29\x29\x20\x26\x26\x20\x74\x33\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3d\x3d\x3d\x20\x34\x20\x3f\x20\x22\x23\x22\x20\x2b\x20\x28\x22\x30\x22\x20\x2b\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x74\x33\x5b\x31\x5d\x2c\x20\x31\x30\x29\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x28\x31\x36\x29\x29\x2e\x73\x6c\x69\x63\x65\x28\x2d\x32\x29\x20\x2b\x20\x28\x22\x30\x22\x20\x2b\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x74\x33\x5b\x32\x5d\x2c\x20\x31\x30\x29\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x28\x31\x36\x29\x29\x2e\x73\x6c\x69\x63\x65\x28\x2d\x32\x29\x20\x2b\x20\x28\x22\x30\x22\x20\x2b\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x74\x33\x5b\x33\x5d\x2c\x20\x31\x30\x29\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x28\x31\x36\x29\x29\x2e\x73\x6c\x69\x63\x65\x28\x2d\x32\x29\x20\x3a\x20\x22\x22\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x69\x73\x43\x6f\x6c\x6f\x72\x48\x65\x78\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x2f\x28\x5e\x23\x5b\x30\x2d\x39\x41\x2d\x46\x5d\x7b\x36\x7d\x24\x29\x7c\x28\x5e\x23\x5b\x30\x2d\x39\x41\x2d\x46\x5d\x7b\x33\x7d\x24\x29\x7c\x28\x5e\x23\x5b\x30\x2d\x39\x41\x2d\x46\x5d\x7b\x38\x7d\x24\x29\x2f\x69\x2e\x74\x65\x73\x74\x28\x74\x33\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x67\x65\x74\x50\x6f\x6c\x79\x67\x6f\x6e\x50\x6f\x73\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x5b\x5d\x2c\x20\x61\x32\x20\x3d\x20\x32\x20\x2a\x20\x4d\x61\x74\x68\x2e\x50\x49\x20\x2f\x20\x65\x32\x2c\x20\x73\x32\x20\x3d\x20\x30\x3b\x20\x73\x32\x20\x3c\x20\x65\x32\x3b\x20\x73\x32\x2b\x2b\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x72\x32\x20\x3d\x20\x7b\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x32\x2e\x78\x20\x3d\x20\x74\x33\x20\x2a\x20\x4d\x61\x74\x68\x2e\x73\x69\x6e\x28\x73\x32\x20\x2a\x20\x61\x32\x29\x2c\x20\x72\x32\x2e\x79\x20\x3d\x20\x2d\x74\x33\x20\x2a\x20\x4d\x61\x74\x68\x2e\x63\x6f\x73\x28\x73\x32\x20\x2a\x20\x61\x32\x29\x2c\x20\x69\x32\x2e\x70\x75\x73\x68\x28\x72\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x32\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x70\x6f\x6c\x61\x72\x54\x6f\x43\x61\x72\x74\x65\x73\x69\x61\x6e\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x2c\x20\x61\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x73\x32\x20\x3d\x20\x28\x61\x32\x20\x2d\x20\x39\x30\x29\x20\x2a\x20\x4d\x61\x74\x68\x2e\x50\x49\x20\x2f\x20\x31\x38\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x7b\x20\x78\x3a\x20\x74\x33\x20\x2b\x20\x69\x32\x20\x2a\x20\x4d\x61\x74\x68\x2e\x63\x6f\x73\x28\x73\x32\x29\x2c\x20\x79\x3a\x20\x65\x32\x20\x2b\x20\x69\x32\x20\x2a\x20\x4d\x61\x74\x68\x2e\x73\x69\x6e\x28\x73\x32\x29\x20\x7d\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x65\x73\x63\x61\x70\x65\x53\x74\x72\x69\x6e\x67\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x65\x32\x20\x3d\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x31\x20\x26\x26\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x31\x5d\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x31\x5d\x20\x3a\x20\x22\x78\x22\x2c\x20\x69\x32\x20\x3d\x20\x74\x33\x2e\x74\x6f\x53\x74\x72\x69\x6e\x67\x28\x29\x2e\x73\x6c\x69\x63\x65\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x69\x32\x20\x3d\x20\x69\x32\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x2f\x5b\x60\x20\x7e\x21\x40\x23\x24\x25\x5e\x26\x2a\x28\x29\x5f\x7c\x2b\x5c\x2d\x3d\x3f\x3b\x3a\x27\x22\x2c\x2e\x3c\x3e\x7b\x7d\x5b\x5c\x5d\x5c\x5c\x2f\x5d\x2f\x67\x69\x2c\x20\x65\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x6e\x65\x67\x54\x6f\x5a\x65\x72\x6f\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x20\x3c\x20\x30\x20\x3f\x20\x30\x20\x3a\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x6d\x6f\x76\x65\x49\x6e\x64\x65\x78\x49\x6e\x41\x72\x72\x61\x79\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x69\x32\x20\x3e\x3d\x20\x74\x33\x2e\x6c\x65\x6e\x67\x74\x68\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x69\x32\x20\x2d\x20\x74\x33\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2b\x20\x31\x3b\x20\x61\x32\x2d\x2d\x3b\x20\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x70\x75\x73\x68\x28\x76\x6f\x69\x64\x20\x30\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x2e\x73\x70\x6c\x69\x63\x65\x28\x69\x32\x2c\x20\x30\x2c\x20\x74\x33\x2e\x73\x70\x6c\x69\x63\x65\x28\x65\x32\x2c\x20\x31\x29\x5b\x30\x5d\x29\x2c\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x65\x78\x74\x72\x61\x63\x74\x4e\x75\x6d\x62\x65\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x61\x72\x73\x65\x46\x6c\x6f\x61\x74\x28\x74\x33\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x2f\x5b\x5e\x5c\x64\x2e\x5d\x2a\x2f\x67\x2c\x20\x22\x22\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x66\x69\x6e\x64\x41\x6e\x63\x65\x73\x74\x6f\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x3b\x20\x28\x74\x33\x20\x3d\x20\x74\x33\x2e\x70\x61\x72\x65\x6e\x74\x45\x6c\x65\x6d\x65\x6e\x74\x29\x20\x26\x26\x20\x21\x74\x33\x2e\x63\x6c\x61\x73\x73\x4c\x69\x73\x74\x2e\x63\x6f\x6e\x74\x61\x69\x6e\x73\x28\x65\x32\x29\x3b\x20\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x73\x65\x74\x45\x4c\x73\x74\x79\x6c\x65\x73\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x69\x32\x20\x69\x6e\x20\x65\x32\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x32\x2e\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x69\x32\x29\x20\x26\x26\x20\x28\x74\x33\x2e\x73\x74\x79\x6c\x65\x2e\x6b\x65\x79\x20\x3d\x20\x65\x32\x5b\x69\x32\x5d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x69\x73\x4e\x75\x6d\x62\x65\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x21\x69\x73\x4e\x61\x4e\x28\x74\x33\x29\x20\x26\x26\x20\x70\x61\x72\x73\x65\x46\x6c\x6f\x61\x74\x28\x4e\x75\x6d\x62\x65\x72\x28\x74\x33\x29\x29\x20\x3d\x3d\x3d\x20\x74\x33\x20\x26\x26\x20\x21\x69\x73\x4e\x61\x4e\x28\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x74\x33\x2c\x20\x31\x30\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x69\x73\x46\x6c\x6f\x61\x74\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x4e\x75\x6d\x62\x65\x72\x28\x74\x33\x29\x20\x3d\x3d\x3d\x20\x74\x33\x20\x26\x26\x20\x74\x33\x20\x25\x20\x31\x20\x21\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x69\x73\x53\x61\x66\x61\x72\x69\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x2f\x5e\x28\x28\x3f\x21\x63\x68\x72\x6f\x6d\x65\x7c\x61\x6e\x64\x72\x6f\x69\x64\x29\x2e\x29\x2a\x73\x61\x66\x61\x72\x69\x2f\x69\x2e\x74\x65\x73\x74\x28\x6e\x61\x76\x69\x67\x61\x74\x6f\x72\x2e\x75\x73\x65\x72\x41\x67\x65\x6e\x74\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x69\x73\x46\x69\x72\x65\x66\x6f\x78\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x6e\x61\x76\x69\x67\x61\x74\x6f\x72\x2e\x75\x73\x65\x72\x41\x67\x65\x6e\x74\x2e\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65\x28\x29\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x66\x69\x72\x65\x66\x6f\x78\x22\x29\x20\x3e\x20\x2d\x31\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x69\x73\x49\x45\x31\x31\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x77\x69\x6e\x64\x6f\x77\x2e\x6e\x61\x76\x69\x67\x61\x74\x6f\x72\x2e\x75\x73\x65\x72\x41\x67\x65\x6e\x74\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x4d\x53\x49\x45\x22\x29\x20\x21\x3d\x3d\x20\x2d\x31\x20\x7c\x7c\x20\x77\x69\x6e\x64\x6f\x77\x2e\x6e\x61\x76\x69\x67\x61\x74\x6f\x72\x2e\x61\x70\x70\x56\x65\x72\x73\x69\x6f\x6e\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x54\x72\x69\x64\x65\x6e\x74\x2f\x22\x29\x20\x3e\x20\x2d\x31\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x72\x75\x65\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x69\x73\x49\x45\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x74\x33\x20\x3d\x20\x77\x69\x6e\x64\x6f\x77\x2e\x6e\x61\x76\x69\x67\x61\x74\x6f\x72\x2e\x75\x73\x65\x72\x41\x67\x65\x6e\x74\x2c\x20\x65\x32\x20\x3d\x20\x74\x33\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x4d\x53\x49\x45\x20\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x65\x32\x20\x3e\x20\x30\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x74\x33\x2e\x73\x75\x62\x73\x74\x72\x69\x6e\x67\x28\x65\x32\x20\x2b\x20\x35\x2c\x20\x74\x33\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x2e\x22\x2c\x20\x65\x32\x29\x29\x2c\x20\x31\x30\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x74\x33\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x54\x72\x69\x64\x65\x6e\x74\x2f\x22\x29\x20\x3e\x20\x30\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x74\x33\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x72\x76\x3a\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x74\x33\x2e\x73\x75\x62\x73\x74\x72\x69\x6e\x67\x28\x69\x32\x20\x2b\x20\x33\x2c\x20\x74\x33\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x2e\x22\x2c\x20\x69\x32\x29\x29\x2c\x20\x31\x30\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x74\x33\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x45\x64\x67\x65\x2f\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x61\x32\x20\x3e\x20\x30\x20\x26\x26\x20\x70\x61\x72\x73\x65\x49\x6e\x74\x28\x74\x33\x2e\x73\x75\x62\x73\x74\x72\x69\x6e\x67\x28\x61\x32\x20\x2b\x20\x35\x2c\x20\x74\x33\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x2e\x22\x2c\x20\x61\x32\x29\x29\x2c\x20\x31\x30\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x5d\x29\x2c\x20\x74\x32\x3b\x0a\x20\x20\x7d\x28\x29\x2c\x20\x62\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x32\x28\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x28\x74\x68\x69\x73\x2c\x20\x74\x32\x29\x2c\x20\x74\x68\x69\x73\x2e\x63\x74\x78\x20\x3d\x20\x65\x32\x2c\x20\x74\x68\x69\x73\x2e\x77\x20\x3d\x20\x65\x32\x2e\x77\x2c\x20\x74\x68\x69\x73\x2e\x73\x65\x74\x45\x61\x73\x69\x6e\x67\x46\x75\x6e\x63\x74\x69\x6f\x6e\x73\x28\x29\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x28\x74\x32\x2c\x20\x5b\x7b\x20\x6b\x65\x79\x3a\x20\x22\x73\x65\x74\x45\x61\x73\x69\x6e\x67\x46\x75\x6e\x63\x74\x69\x6f\x6e\x73\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x21\x74\x68\x69\x73\x2e\x77\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x65\x61\x73\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x77\x69\x74\x63\x68\x20\x28\x74\x68\x69\x73\x2e\x77\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x73\x2e\x65\x61\x73\x69\x6e\x67\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x6c\x69\x6e\x65\x61\x72\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x20\x3d\x20\x22\x2d\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x65\x61\x73\x65\x69\x6e\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x20\x3d\x20\x22\x3c\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x65\x61\x73\x65\x6f\x75\x74\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x20\x3d\x20\x22\x3e\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x65\x61\x73\x65\x69\x6e\x6f\x75\x74\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x20\x3d\x20\x22\x3c\x3e\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x73\x77\x69\x6e\x67\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x65\x32\x20\x3d\x20\x31\x2e\x37\x30\x31\x35\x38\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x28\x74\x34\x20\x2d\x3d\x20\x31\x29\x20\x2a\x20\x74\x34\x20\x2a\x20\x28\x28\x65\x32\x20\x2b\x20\x31\x29\x20\x2a\x20\x74\x34\x20\x2b\x20\x65\x32\x29\x20\x2b\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x62\x6f\x75\x6e\x63\x65\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x34\x20\x3c\x20\x31\x20\x2f\x20\x32\x2e\x37\x35\x20\x3f\x20\x37\x2e\x35\x36\x32\x35\x20\x2a\x20\x74\x34\x20\x2a\x20\x74\x34\x20\x3a\x20\x74\x34\x20\x3c\x20\x32\x20\x2f\x20\x32\x2e\x37\x35\x20\x3f\x20\x37\x2e\x35\x36\x32\x35\x20\x2a\x20\x28\x74\x34\x20\x2d\x3d\x20\x31\x2e\x35\x20\x2f\x20\x32\x2e\x37\x35\x29\x20\x2a\x20\x74\x34\x20\x2b\x20\x30\x2e\x37\x35\x20\x3a\x20\x74\x34\x20\x3c\x20\x32\x2e\x35\x20\x2f\x20\x32\x2e\x37\x35\x20\x3f\x20\x37\x2e\x35\x36\x32\x35\x20\x2a\x20\x28\x74\x34\x20\x2d\x3d\x20\x32\x2e\x32\x35\x20\x2f\x20\x32\x2e\x37\x35\x29\x20\x2a\x20\x74\x34\x20\x2b\x20\x30\x2e\x39\x33\x37\x35\x20\x3a\x20\x37\x2e\x35\x36\x32\x35\x20\x2a\x20\x28\x74\x34\x20\x2d\x3d\x20\x32\x2e\x36\x32\x35\x20\x2f\x20\x32\x2e\x37\x35\x29\x20\x2a\x20\x74\x34\x20\x2b\x20\x30\x2e\x39\x38\x34\x33\x37\x35\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x65\x6c\x61\x73\x74\x69\x63\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x34\x20\x3d\x3d\x3d\x20\x21\x21\x74\x34\x20\x3f\x20\x74\x34\x20\x3a\x20\x4d\x61\x74\x68\x2e\x70\x6f\x77\x28\x32\x2c\x20\x2d\x31\x30\x20\x2a\x20\x74\x34\x29\x20\x2a\x20\x4d\x61\x74\x68\x2e\x73\x69\x6e\x28\x28\x74\x34\x20\x2d\x20\x30\x2e\x30\x37\x35\x29\x20\x2a\x20\x28\x32\x20\x2a\x20\x4d\x61\x74\x68\x2e\x50\x49\x29\x20\x2f\x20\x30\x2e\x33\x29\x20\x2b\x20\x31\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x65\x66\x61\x75\x6c\x74\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x20\x3d\x20\x22\x3c\x3e\x22\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x77\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x65\x61\x73\x69\x6e\x67\x20\x3d\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x6e\x69\x6d\x61\x74\x65\x4c\x69\x6e\x65\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x2c\x20\x61\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x61\x74\x74\x72\x28\x65\x32\x29\x2e\x61\x6e\x69\x6d\x61\x74\x65\x28\x61\x32\x29\x2e\x61\x74\x74\x72\x28\x69\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x6e\x69\x6d\x61\x74\x65\x4d\x61\x72\x6b\x65\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x2c\x20\x61\x32\x2c\x20\x73\x32\x2c\x20\x72\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x65\x32\x20\x7c\x7c\x20\x28\x65\x32\x20\x3d\x20\x30\x29\x2c\x20\x74\x33\x2e\x61\x74\x74\x72\x28\x7b\x20\x72\x3a\x20\x65\x32\x2c\x20\x77\x69\x64\x74\x68\x3a\x20\x65\x32\x2c\x20\x68\x65\x69\x67\x68\x74\x3a\x20\x65\x32\x20\x7d\x29\x2e\x61\x6e\x69\x6d\x61\x74\x65\x28\x61\x32\x2c\x20\x73\x32\x29\x2e\x61\x74\x74\x72\x28\x7b\x20\x72\x3a\x20\x69\x32\x2c\x20\x77\x69\x64\x74\x68\x3a\x20\x69\x32\x2e\x77\x69\x64\x74\x68\x2c\x20\x68\x65\x69\x67\x68\x74\x3a\x20\x69\x32\x2e\x68\x65\x69\x67\x68\x74\x20\x7d\x29\x2e\x61\x66\x74\x65\x72\x41\x6c\x6c\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x32\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x6e\x69\x6d\x61\x74\x65\x43\x69\x72\x63\x6c\x65\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x2c\x20\x61\x32\x2c\x20\x73\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x61\x74\x74\x72\x28\x7b\x20\x72\x3a\x20\x65\x32\x2e\x72\x2c\x20\x63\x78\x3a\x20\x65\x32\x2e\x63\x78\x2c\x20\x63\x79\x3a\x20\x65\x32\x2e\x63\x79\x20\x7d\x29\x2e\x61\x6e\x69\x6d\x61\x74\x65\x28\x61\x32\x2c\x20\x73\x32\x29\x2e\x61\x74\x74\x72\x28\x7b\x20\x72\x3a\x20\x69\x32\x2e\x72\x2c\x20\x63\x78\x3a\x20\x69\x32\x2e\x63\x78\x2c\x20\x63\x79\x3a\x20\x69\x32\x2e\x63\x79\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x6e\x69\x6d\x61\x74\x65\x52\x65\x63\x74\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x2c\x20\x61\x32\x2c\x20\x73\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x61\x74\x74\x72\x28\x65\x32\x29\x2e\x61\x6e\x69\x6d\x61\x74\x65\x28\x61\x32\x29\x2e\x61\x74\x74\x72\x28\x69\x32\x29\x2e\x61\x66\x74\x65\x72\x41\x6c\x6c\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x32\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x6e\x69\x6d\x61\x74\x65\x50\x61\x74\x68\x73\x47\x72\x61\x64\x75\x61\x6c\x6c\x79\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x65\x32\x20\x3d\x20\x74\x33\x2e\x65\x6c\x2c\x20\x69\x32\x20\x3d\x20\x74\x33\x2e\x72\x65\x61\x6c\x49\x6e\x64\x65\x78\x2c\x20\x61\x32\x20\x3d\x20\x74\x33\x2e\x6a\x2c\x20\x73\x32\x20\x3d\x20\x74\x33\x2e\x66\x69\x6c\x6c\x2c\x20\x72\x32\x20\x3d\x20\x74\x33\x2e\x70\x61\x74\x68\x46\x72\x6f\x6d\x2c\x20\x6f\x32\x20\x3d\x20\x74\x33\x2e\x70\x61\x74\x68\x54\x6f\x2c\x20\x6e\x32\x20\x3d\x20\x74\x33\x2e\x73\x70\x65\x65\x64\x2c\x20\x6c\x32\x20\x3d\x20\x74\x33\x2e\x64\x65\x6c\x61\x79\x2c\x20\x68\x33\x20\x3d\x20\x74\x68\x69\x73\x2e\x77\x2c\x20\x63\x32\x20\x3d\x20\x30\x3b\x0a\x20\x20\x20\x20\x20\x20\x68\x33\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x73\x2e\x61\x6e\x69\x6d\x61\x74\x65\x47\x72\x61\x64\x75\x61\x6c\x6c\x79\x2e\x65\x6e\x61\x62\x6c\x65\x64\x20\x26\x26\x20\x28\x63\x32\x20\x3d\x20\x68\x33\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x73\x2e\x61\x6e\x69\x6d\x61\x74\x65\x47\x72\x61\x64\x75\x61\x6c\x6c\x79\x2e\x64\x65\x6c\x61\x79\x29\x2c\x20\x68\x33\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x73\x2e\x64\x79\x6e\x61\x6d\x69\x63\x41\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x2e\x65\x6e\x61\x62\x6c\x65\x64\x20\x26\x26\x20\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x64\x61\x74\x61\x43\x68\x61\x6e\x67\x65\x64\x20\x26\x26\x20\x68\x33\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x22\x62\x61\x72\x22\x20\x26\x26\x20\x28\x63\x32\x20\x3d\x20\x30\x29\x2c\x20\x74\x68\x69\x73\x2e\x6d\x6f\x72\x70\x68\x53\x56\x47\x28\x65\x32\x2c\x20\x69\x32\x2c\x20\x61\x32\x2c\x20\x68\x33\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x74\x79\x70\x65\x20\x21\x3d\x3d\x20\x22\x6c\x69\x6e\x65\x22\x20\x7c\x7c\x20\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x63\x6f\x6d\x62\x6f\x43\x68\x61\x72\x74\x73\x20\x3f\x20\x73\x32\x20\x3a\x20\x22\x73\x74\x72\x6f\x6b\x65\x22\x2c\x20\x72\x32\x2c\x20\x6f\x32\x2c\x20\x6e\x32\x2c\x20\x6c\x32\x20\x2a\x20\x63\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x73\x68\x6f\x77\x44\x65\x6c\x61\x79\x65\x64\x45\x6c\x65\x6d\x65\x6e\x74\x73\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x77\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x64\x65\x6c\x61\x79\x65\x64\x45\x6c\x65\x6d\x65\x6e\x74\x73\x2e\x66\x6f\x72\x45\x61\x63\x68\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x65\x6c\x2e\x63\x6c\x61\x73\x73\x4c\x69\x73\x74\x2e\x72\x65\x6d\x6f\x76\x65\x28\x22\x61\x70\x65\x78\x63\x68\x61\x72\x74\x73\x2d\x65\x6c\x65\x6d\x65\x6e\x74\x2d\x68\x69\x64\x64\x65\x6e\x22\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x43\x6f\x6d\x70\x6c\x65\x74\x65\x64\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x65\x32\x20\x3d\x20\x74\x68\x69\x73\x2e\x77\x3b\x0a\x20\x20\x20\x20\x20\x20\x65\x32\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x45\x6e\x64\x65\x64\x20\x7c\x7c\x20\x28\x65\x32\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x45\x6e\x64\x65\x64\x20\x3d\x20\x74\x72\x75\x65\x2c\x20\x74\x68\x69\x73\x2e\x73\x68\x6f\x77\x44\x65\x6c\x61\x79\x65\x64\x45\x6c\x65\x6d\x65\x6e\x74\x73\x28\x29\x2c\x20\x74\x79\x70\x65\x6f\x66\x20\x65\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x65\x76\x65\x6e\x74\x73\x2e\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x45\x6e\x64\x20\x3d\x3d\x20\x22\x66\x75\x6e\x63\x74\x69\x6f\x6e\x22\x20\x26\x26\x20\x65\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x65\x76\x65\x6e\x74\x73\x2e\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x45\x6e\x64\x28\x74\x68\x69\x73\x2e\x63\x74\x78\x2c\x20\x7b\x20\x65\x6c\x3a\x20\x74\x33\x2c\x20\x77\x3a\x20\x65\x32\x20\x7d\x29\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x6d\x6f\x72\x70\x68\x53\x56\x47\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x2c\x20\x61\x32\x2c\x20\x73\x32\x2c\x20\x72\x32\x2c\x20\x6f\x32\x2c\x20\x6e\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x6c\x32\x20\x3d\x20\x74\x68\x69\x73\x2c\x20\x68\x33\x20\x3d\x20\x74\x68\x69\x73\x2e\x77\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x32\x20\x7c\x7c\x20\x28\x73\x32\x20\x3d\x20\x74\x33\x2e\x61\x74\x74\x72\x28\x22\x70\x61\x74\x68\x46\x72\x6f\x6d\x22\x29\x29\x2c\x20\x72\x32\x20\x7c\x7c\x20\x28\x72\x32\x20\x3d\x20\x74\x33\x2e\x61\x74\x74\x72\x28\x22\x70\x61\x74\x68\x54\x6f\x22\x29\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x63\x32\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x68\x33\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x72\x61\x64\x61\x72\x22\x20\x26\x26\x20\x28\x6f\x32\x20\x3d\x20\x31\x29\x2c\x20\x22\x4d\x20\x30\x20\x22\x2e\x63\x6f\x6e\x63\x61\x74\x28\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x67\x72\x69\x64\x48\x65\x69\x67\x68\x74\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x3b\x0a\x20\x20\x20\x20\x20\x20\x28\x21\x73\x32\x20\x7c\x7c\x20\x73\x32\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x29\x20\x3e\x20\x2d\x31\x20\x7c\x7c\x20\x73\x32\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x4e\x61\x4e\x22\x29\x20\x3e\x20\x2d\x31\x29\x20\x26\x26\x20\x28\x73\x32\x20\x3d\x20\x63\x32\x28\x29\x29\x2c\x20\x28\x21\x72\x32\x20\x7c\x7c\x20\x72\x32\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x75\x6e\x64\x65\x66\x69\x6e\x65\x64\x22\x29\x20\x3e\x20\x2d\x31\x20\x7c\x7c\x20\x72\x32\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x4e\x61\x4e\x22\x29\x20\x3e\x20\x2d\x31\x29\x20\x26\x26\x20\x28\x72\x32\x20\x3d\x20\x63\x32\x28\x29\x29\x2c\x20\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x73\x68\x6f\x75\x6c\x64\x41\x6e\x69\x6d\x61\x74\x65\x20\x7c\x7c\x20\x28\x6f\x32\x20\x3d\x20\x31\x29\x2c\x20\x74\x33\x2e\x70\x6c\x6f\x74\x28\x73\x32\x29\x2e\x61\x6e\x69\x6d\x61\x74\x65\x28\x31\x2c\x20\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x65\x61\x73\x69\x6e\x67\x2c\x20\x6e\x32\x29\x2e\x70\x6c\x6f\x74\x28\x73\x32\x29\x2e\x61\x6e\x69\x6d\x61\x74\x65\x28\x6f\x32\x2c\x20\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x65\x61\x73\x69\x6e\x67\x2c\x20\x6e\x32\x29\x2e\x70\x6c\x6f\x74\x28\x72\x32\x29\x2e\x61\x66\x74\x65\x72\x41\x6c\x6c\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x78\x2e\x69\x73\x4e\x75\x6d\x62\x65\x72\x28\x69\x32\x29\x20\x3f\x20\x69\x32\x20\x3d\x3d\x3d\x20\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x73\x65\x72\x69\x65\x73\x5b\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x6d\x61\x78\x56\x61\x6c\x73\x49\x6e\x41\x72\x72\x61\x79\x49\x6e\x64\x65\x78\x5d\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2d\x20\x32\x20\x26\x26\x20\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x73\x68\x6f\x75\x6c\x64\x41\x6e\x69\x6d\x61\x74\x65\x20\x26\x26\x20\x6c\x32\x2e\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x43\x6f\x6d\x70\x6c\x65\x74\x65\x64\x28\x74\x33\x29\x20\x3a\x20\x61\x32\x20\x21\x3d\x3d\x20\x22\x6e\x6f\x6e\x65\x22\x20\x26\x26\x20\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x73\x68\x6f\x75\x6c\x64\x41\x6e\x69\x6d\x61\x74\x65\x20\x26\x26\x20\x28\x21\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x63\x6f\x6d\x62\x6f\x43\x68\x61\x72\x74\x73\x20\x26\x26\x20\x65\x32\x20\x3d\x3d\x3d\x20\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x73\x65\x72\x69\x65\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x2d\x20\x31\x20\x7c\x7c\x20\x68\x33\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x63\x6f\x6d\x62\x6f\x43\x68\x61\x72\x74\x73\x29\x20\x26\x26\x20\x6c\x32\x2e\x61\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x43\x6f\x6d\x70\x6c\x65\x74\x65\x64\x28\x74\x33\x29\x2c\x20\x6c\x32\x2e\x73\x68\x6f\x77\x44\x65\x6c\x61\x79\x65\x64\x45\x6c\x65\x6d\x65\x6e\x74\x73\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x5d\x29\x2c\x20\x74\x32\x3b\x0a\x20\x20\x7d\x28\x29\x2c\x20\x76\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x32\x28\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x28\x74\x68\x69\x73\x2c\x20\x74\x32\x29\x2c\x20\x74\x68\x69\x73\x2e\x63\x74\x78\x20\x3d\x20\x65\x32\x2c\x20\x74\x68\x69\x73\x2e\x77\x20\x3d\x20\x65\x32\x2e\x77\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x28\x74\x32\x2c\x20\x5b\x7b\x20\x6b\x65\x79\x3a\x20\x22\x67\x65\x74\x44\x65\x66\x61\x75\x6c\x74\x46\x69\x6c\x74\x65\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x74\x68\x69\x73\x2e\x77\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x75\x6e\x66\x69\x6c\x74\x65\x72\x28\x74\x72\x75\x65\x29\x2c\x20\x6e\x65\x77\x20\x77\x69\x6e\x64\x6f\x77\x2e\x53\x56\x47\x2e\x46\x69\x6c\x74\x65\x72\x28\x29\x2e\x73\x69\x7a\x65\x28\x22\x31\x32\x30\x25\x22\x2c\x20\x22\x31\x38\x30\x25\x22\x2c\x20\x22\x2d\x35\x25\x22\x2c\x20\x22\x2d\x34\x30\x25\x22\x29\x2c\x20\x69\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x73\x74\x61\x74\x65\x73\x2e\x6e\x6f\x72\x6d\x61\x6c\x2e\x66\x69\x6c\x74\x65\x72\x20\x21\x3d\x3d\x20\x22\x6e\x6f\x6e\x65\x22\x20\x3f\x20\x74\x68\x69\x73\x2e\x61\x70\x70\x6c\x79\x46\x69\x6c\x74\x65\x72\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x73\x74\x61\x74\x65\x73\x2e\x6e\x6f\x72\x6d\x61\x6c\x2e\x66\x69\x6c\x74\x65\x72\x2e\x74\x79\x70\x65\x2c\x20\x69\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x73\x74\x61\x74\x65\x73\x2e\x6e\x6f\x72\x6d\x61\x6c\x2e\x66\x69\x6c\x74\x65\x72\x2e\x76\x61\x6c\x75\x65\x29\x20\x3a\x20\x69\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x64\x72\x6f\x70\x53\x68\x61\x64\x6f\x77\x2e\x65\x6e\x61\x62\x6c\x65\x64\x20\x26\x26\x20\x74\x68\x69\x73\x2e\x64\x72\x6f\x70\x53\x68\x61\x64\x6f\x77\x28\x74\x33\x2c\x20\x69\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x64\x72\x6f\x70\x53\x68\x61\x64\x6f\x77\x2c\x20\x65\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x64\x64\x4e\x6f\x72\x6d\x61\x6c\x46\x69\x6c\x74\x65\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x74\x68\x69\x73\x2e\x77\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x64\x72\x6f\x70\x53\x68\x61\x64\x6f\x77\x2e\x65\x6e\x61\x62\x6c\x65\x64\x20\x26\x26\x20\x21\x74\x33\x2e\x6e\x6f\x64\x65\x2e\x63\x6c\x61\x73\x73\x4c\x69\x73\x74\x2e\x63\x6f\x6e\x74\x61\x69\x6e\x73\x28\x22\x61\x70\x65\x78\x63\x68\x61\x72\x74\x73\x2d\x6d\x61\x72\x6b\x65\x72\x22\x29\x20\x26\x26\x20\x74\x68\x69\x73\x2e\x64\x72\x6f\x70\x53\x68\x61\x64\x6f\x77\x28\x74\x33\x2c\x20\x69\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x64\x72\x6f\x70\x53\x68\x61\x64\x6f\x77\x2c\x20\x65\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x64\x64\x4c\x69\x67\x68\x74\x65\x6e\x46\x69\x6c\x74\x65\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x74\x68\x69\x73\x2c\x20\x73\x32\x20\x3d\x20\x74\x68\x69\x73\x2e\x77\x2c\x20\x72\x32\x20\x3d\x20\x69\x32\x2e\x69\x6e\x74\x65\x6e\x73\x69\x74\x79\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x75\x6e\x66\x69\x6c\x74\x65\x72\x28\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x77\x20\x77\x69\x6e\x64\x6f\x77\x2e\x53\x56\x47\x2e\x46\x69\x6c\x74\x65\x72\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x66\x69\x6c\x74\x65\x72\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x33\x20\x3d\x20\x73\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x64\x72\x6f\x70\x53\x68\x61\x64\x6f\x77\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x28\x69\x33\x2e\x65\x6e\x61\x62\x6c\x65\x64\x20\x3f\x20\x61\x32\x2e\x61\x64\x64\x53\x68\x61\x64\x6f\x77\x28\x74\x34\x2c\x20\x65\x32\x2c\x20\x69\x33\x29\x20\x3a\x20\x74\x34\x29\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x54\x72\x61\x6e\x73\x66\x65\x72\x28\x7b\x20\x72\x67\x62\x3a\x20\x7b\x20\x74\x79\x70\x65\x3a\x20\x22\x6c\x69\x6e\x65\x61\x72\x22\x2c\x20\x73\x6c\x6f\x70\x65\x3a\x20\x31\x2e\x35\x2c\x20\x69\x6e\x74\x65\x72\x63\x65\x70\x74\x3a\x20\x72\x32\x20\x7d\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x2c\x20\x74\x33\x2e\x66\x69\x6c\x74\x65\x72\x65\x72\x2e\x6e\x6f\x64\x65\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x22\x66\x69\x6c\x74\x65\x72\x55\x6e\x69\x74\x73\x22\x2c\x20\x22\x75\x73\x65\x72\x53\x70\x61\x63\x65\x4f\x6e\x55\x73\x65\x22\x29\x2c\x20\x74\x68\x69\x73\x2e\x5f\x73\x63\x61\x6c\x65\x46\x69\x6c\x74\x65\x72\x53\x69\x7a\x65\x28\x74\x33\x2e\x66\x69\x6c\x74\x65\x72\x65\x72\x2e\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x64\x64\x44\x61\x72\x6b\x65\x6e\x46\x69\x6c\x74\x65\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x74\x68\x69\x73\x2c\x20\x73\x32\x20\x3d\x20\x74\x68\x69\x73\x2e\x77\x2c\x20\x72\x32\x20\x3d\x20\x69\x32\x2e\x69\x6e\x74\x65\x6e\x73\x69\x74\x79\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x75\x6e\x66\x69\x6c\x74\x65\x72\x28\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x6e\x65\x77\x20\x77\x69\x6e\x64\x6f\x77\x2e\x53\x56\x47\x2e\x46\x69\x6c\x74\x65\x72\x28\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x66\x69\x6c\x74\x65\x72\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x33\x20\x3d\x20\x73\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x64\x72\x6f\x70\x53\x68\x61\x64\x6f\x77\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x28\x69\x33\x2e\x65\x6e\x61\x62\x6c\x65\x64\x20\x3f\x20\x61\x32\x2e\x61\x64\x64\x53\x68\x61\x64\x6f\x77\x28\x74\x34\x2c\x20\x65\x32\x2c\x20\x69\x33\x29\x20\x3a\x20\x74\x34\x29\x2e\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x54\x72\x61\x6e\x73\x66\x65\x72\x28\x7b\x20\x72\x67\x62\x3a\x20\x7b\x20\x74\x79\x70\x65\x3a\x20\x22\x6c\x69\x6e\x65\x61\x72\x22\x2c\x20\x73\x6c\x6f\x70\x65\x3a\x20\x72\x32\x20\x7d\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x2c\x20\x74\x33\x2e\x66\x69\x6c\x74\x65\x72\x65\x72\x2e\x6e\x6f\x64\x65\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x22\x66\x69\x6c\x74\x65\x72\x55\x6e\x69\x74\x73\x22\x2c\x20\x22\x75\x73\x65\x72\x53\x70\x61\x63\x65\x4f\x6e\x55\x73\x65\x22\x29\x2c\x20\x74\x68\x69\x73\x2e\x5f\x73\x63\x61\x6c\x65\x46\x69\x6c\x74\x65\x72\x53\x69\x7a\x65\x28\x74\x33\x2e\x66\x69\x6c\x74\x65\x72\x65\x72\x2e\x6e\x6f\x64\x65\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x70\x70\x6c\x79\x46\x69\x6c\x74\x65\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x33\x20\x26\x26\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x33\x5d\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x33\x5d\x20\x3a\x20\x30\x2e\x35\x3b\x0a\x20\x20\x20\x20\x20\x20\x73\x77\x69\x74\x63\x68\x20\x28\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x6e\x6f\x6e\x65\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x61\x64\x64\x4e\x6f\x72\x6d\x61\x6c\x46\x69\x6c\x74\x65\x72\x28\x74\x33\x2c\x20\x65\x32\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x6c\x69\x67\x68\x74\x65\x6e\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x61\x64\x64\x4c\x69\x67\x68\x74\x65\x6e\x46\x69\x6c\x74\x65\x72\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x7b\x20\x69\x6e\x74\x65\x6e\x73\x69\x74\x79\x3a\x20\x61\x32\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x72\x65\x61\x6b\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x61\x73\x65\x20\x22\x64\x61\x72\x6b\x65\x6e\x22\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x74\x68\x69\x73\x2e\x61\x64\x64\x44\x61\x72\x6b\x65\x6e\x46\x69\x6c\x74\x65\x72\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x7b\x20\x69\x6e\x74\x65\x6e\x73\x69\x74\x79\x3a\x20\x61\x32\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x61\x64\x64\x53\x68\x61\x64\x6f\x77\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x69\x32\x2e\x62\x6c\x75\x72\x2c\x20\x73\x32\x20\x3d\x20\x69\x32\x2e\x74\x6f\x70\x2c\x20\x72\x32\x20\x3d\x20\x69\x32\x2e\x6c\x65\x66\x74\x2c\x20\x6f\x32\x20\x3d\x20\x69\x32\x2e\x63\x6f\x6c\x6f\x72\x2c\x20\x6e\x32\x20\x3d\x20\x69\x32\x2e\x6f\x70\x61\x63\x69\x74\x79\x2c\x20\x6c\x32\x20\x3d\x20\x74\x33\x2e\x66\x6c\x6f\x6f\x64\x28\x41\x72\x72\x61\x79\x2e\x69\x73\x41\x72\x72\x61\x79\x28\x6f\x32\x29\x20\x3f\x20\x6f\x32\x5b\x65\x32\x5d\x20\x3a\x20\x6f\x32\x2c\x20\x6e\x32\x29\x2e\x63\x6f\x6d\x70\x6f\x73\x69\x74\x65\x28\x74\x33\x2e\x73\x6f\x75\x72\x63\x65\x41\x6c\x70\x68\x61\x2c\x20\x22\x69\x6e\x22\x29\x2e\x6f\x66\x66\x73\x65\x74\x28\x72\x32\x2c\x20\x73\x32\x29\x2e\x67\x61\x75\x73\x73\x69\x61\x6e\x42\x6c\x75\x72\x28\x61\x32\x29\x2e\x6d\x65\x72\x67\x65\x28\x74\x33\x2e\x73\x6f\x75\x72\x63\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x2e\x62\x6c\x65\x6e\x64\x28\x74\x33\x2e\x73\x6f\x75\x72\x63\x65\x2c\x20\x6c\x32\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x64\x72\x6f\x70\x53\x68\x61\x64\x6f\x77\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x69\x32\x20\x3d\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x32\x20\x26\x26\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x32\x5d\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x32\x5d\x20\x3a\x20\x30\x2c\x20\x61\x32\x20\x3d\x20\x65\x32\x2e\x74\x6f\x70\x2c\x20\x73\x32\x20\x3d\x20\x65\x32\x2e\x6c\x65\x66\x74\x2c\x20\x72\x32\x20\x3d\x20\x65\x32\x2e\x62\x6c\x75\x72\x2c\x20\x6f\x32\x20\x3d\x20\x65\x32\x2e\x63\x6f\x6c\x6f\x72\x2c\x20\x6e\x32\x20\x3d\x20\x65\x32\x2e\x6f\x70\x61\x63\x69\x74\x79\x2c\x20\x6c\x32\x20\x3d\x20\x65\x32\x2e\x6e\x6f\x55\x73\x65\x72\x53\x70\x61\x63\x65\x4f\x6e\x55\x73\x65\x2c\x20\x68\x33\x20\x3d\x20\x74\x68\x69\x73\x2e\x77\x3b\x0a\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x74\x33\x2e\x75\x6e\x66\x69\x6c\x74\x65\x72\x28\x74\x72\x75\x65\x29\x2c\x20\x78\x2e\x69\x73\x49\x45\x28\x29\x20\x26\x26\x20\x68\x33\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x63\x68\x61\x72\x74\x2e\x74\x79\x70\x65\x20\x3d\x3d\x3d\x20\x22\x72\x61\x64\x69\x61\x6c\x42\x61\x72\x22\x20\x7c\x7c\x20\x28\x6f\x32\x20\x3d\x20\x41\x72\x72\x61\x79\x2e\x69\x73\x41\x72\x72\x61\x79\x28\x6f\x32\x29\x20\x3f\x20\x6f\x32\x5b\x69\x32\x5d\x20\x3a\x20\x6f\x32\x2c\x20\x74\x33\x2e\x66\x69\x6c\x74\x65\x72\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x34\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x65\x33\x20\x3d\x20\x6e\x75\x6c\x6c\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x65\x33\x20\x3d\x20\x78\x2e\x69\x73\x53\x61\x66\x61\x72\x69\x28\x29\x20\x7c\x7c\x20\x78\x2e\x69\x73\x46\x69\x72\x65\x66\x6f\x78\x28\x29\x20\x7c\x7c\x20\x78\x2e\x69\x73\x49\x45\x28\x29\x20\x3f\x20\x74\x34\x2e\x66\x6c\x6f\x6f\x64\x28\x6f\x32\x2c\x20\x6e\x32\x29\x2e\x63\x6f\x6d\x70\x6f\x73\x69\x74\x65\x28\x74\x34\x2e\x73\x6f\x75\x72\x63\x65\x41\x6c\x70\x68\x61\x2c\x20\x22\x69\x6e\x22\x29\x2e\x6f\x66\x66\x73\x65\x74\x28\x73\x32\x2c\x20\x61\x32\x29\x2e\x67\x61\x75\x73\x73\x69\x61\x6e\x42\x6c\x75\x72\x28\x72\x32\x29\x20\x3a\x20\x74\x34\x2e\x66\x6c\x6f\x6f\x64\x28\x6f\x32\x2c\x20\x6e\x32\x29\x2e\x63\x6f\x6d\x70\x6f\x73\x69\x74\x65\x28\x74\x34\x2e\x73\x6f\x75\x72\x63\x65\x41\x6c\x70\x68\x61\x2c\x20\x22\x69\x6e\x22\x29\x2e\x6f\x66\x66\x73\x65\x74\x28\x73\x32\x2c\x20\x61\x32\x29\x2e\x67\x61\x75\x73\x73\x69\x61\x6e\x42\x6c\x75\x72\x28\x72\x32\x29\x2e\x6d\x65\x72\x67\x65\x28\x74\x34\x2e\x73\x6f\x75\x72\x63\x65\x29\x2c\x20\x74\x34\x2e\x62\x6c\x65\x6e\x64\x28\x74\x34\x2e\x73\x6f\x75\x72\x63\x65\x2c\x20\x65\x33\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x29\x2c\x20\x6c\x32\x20\x7c\x7c\x20\x74\x33\x2e\x66\x69\x6c\x74\x65\x72\x65\x72\x2e\x6e\x6f\x64\x65\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x22\x66\x69\x6c\x74\x65\x72\x55\x6e\x69\x74\x73\x22\x2c\x20\x22\x75\x73\x65\x72\x53\x70\x61\x63\x65\x4f\x6e\x55\x73\x65\x22\x29\x2c\x20\x74\x68\x69\x73\x2e\x5f\x73\x63\x61\x6c\x65\x46\x69\x6c\x74\x65\x72\x53\x69\x7a\x65\x28\x74\x33\x2e\x66\x69\x6c\x74\x65\x72\x65\x72\x2e\x6e\x6f\x64\x65\x29\x29\x2c\x20\x74\x33\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x73\x65\x74\x53\x65\x6c\x65\x63\x74\x69\x6f\x6e\x46\x69\x6c\x74\x65\x72\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x61\x32\x20\x3d\x20\x74\x68\x69\x73\x2e\x77\x3b\x0a\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x61\x32\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x73\x65\x6c\x65\x63\x74\x65\x64\x44\x61\x74\x61\x50\x6f\x69\x6e\x74\x73\x5b\x65\x32\x5d\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x26\x26\x20\x61\x32\x2e\x67\x6c\x6f\x62\x61\x6c\x73\x2e\x73\x65\x6c\x65\x63\x74\x65\x64\x44\x61\x74\x61\x50\x6f\x69\x6e\x74\x73\x5b\x65\x32\x5d\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x69\x32\x29\x20\x3e\x20\x2d\x31\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x74\x33\x2e\x6e\x6f\x64\x65\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x22\x73\x65\x6c\x65\x63\x74\x65\x64\x22\x2c\x20\x74\x72\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x73\x32\x20\x3d\x20\x61\x32\x2e\x63\x6f\x6e\x66\x69\x67\x2e\x73\x74\x61\x74\x65\x73\x2e\x61\x63\x74\x69\x76\x65\x2e\x66\x69\x6c\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x73\x32\x20\x21\x3d\x3d\x20\x22\x6e\x6f\x6e\x65\x22\x20\x26\x26\x20\x74\x68\x69\x73\x2e\x61\x70\x70\x6c\x79\x46\x69\x6c\x74\x65\x72\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x73\x32\x2e\x74\x79\x70\x65\x2c\x20\x73\x32\x2e\x76\x61\x6c\x75\x65\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x7d\x20\x7d\x2c\x20\x7b\x20\x6b\x65\x79\x3a\x20\x22\x5f\x73\x63\x61\x6c\x65\x46\x69\x6c\x74\x65\x72\x53\x69\x7a\x65\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x21\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x28\x76\x61\x72\x20\x69\x32\x20\x69\x6e\x20\x65\x32\x29\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x32\x2e\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79\x28\x69\x32\x29\x20\x26\x26\x20\x74\x33\x2e\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x28\x69\x32\x2c\x20\x65\x32\x5b\x69\x32\x5d\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x7d\x28\x7b\x20\x77\x69\x64\x74\x68\x3a\x20\x22\x32\x30\x30\x25\x22\x2c\x20\x68\x65\x69\x67\x68\x74\x3a\x20\x22\x32\x30\x30\x25\x22\x2c\x20\x78\x3a\x20\x22\x2d\x35\x30\x25\x22\x2c\x20\x79\x3a\x20\x22\x2d\x35\x30\x25\x22\x20\x7d\x29\x3b\x0a\x20\x20\x20\x20\x7d\x20\x7d\x5d\x29\x2c\x20\x74\x32\x3b\x0a\x20\x20\x7d\x28\x29\x2c\x20\x6d\x20\x3d\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20\x7b\x0a\x20\x20\x20\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x74\x32\x28\x65\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x61\x28\x74\x68\x69\x73\x2c\x20\x74\x32\x29\x2c\x20\x74\x68\x69\x73\x2e\x63\x74\x78\x20\x3d\x20\x65\x32\x2c\x20\x74\x68\x69\x73\x2e\x77\x20\x3d\x20\x65\x32\x2e\x77\x3b\x0a\x20\x20\x20\x20\x7d\x0a\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x72\x28\x74\x32\x2c\x20\x5b\x7b\x20\x6b\x65\x79\x3a\x20\x22\x64\x72\x61\x77\x4c\x69\x6e\x65\x22\x2c\x20\x76\x61\x6c\x75\x65\x3a\x20\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x74\x33\x2c\x20\x65\x32\x2c\x20\x69\x32\x2c\x20\x61\x32\x29\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x76\x61\x72\x20\x73\x32\x20\x3d\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x34\x20\x26\x26\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x34\x5d\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x34\x5d\x20\x3a\x20\x22\x23\x61\x38\x61\x38\x61\x38\x22\x2c\x20\x72\x32\x20\x3d\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x2e\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x35\x20\x26\x26\x20\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x5b\x35\x5d\x20\x21\x3d\x3d\x20\x76\x6f\x69\x64\x20\x30\x20\x3f\x20\x61\x72\x6