import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.*;
class Ideone
{
{
String s
= "range (bar | thumb_1 | thumb_2 | fill)\nrange(bar|thumb_1|thumb_2|fill)\n.root.range.bar"; System.
out.
println(s.
replaceAll("(?<!\\.)\\b\\w+",
".$0")); }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwucmVnZXguKjsKCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlTdHJpbmcgcyA9ICJyYW5nZSAoYmFyIHwgdGh1bWJfMSB8IHRodW1iXzIgfCBmaWxsKVxucmFuZ2UoYmFyfHRodW1iXzF8dGh1bWJfMnxmaWxsKVxuLnJvb3QucmFuZ2UuYmFyIjsKCQlTeXN0ZW0ub3V0LnByaW50bG4ocy5yZXBsYWNlQWxsKCIoPzwhXFwuKVxcYlxcdysiLCAiLiQwIikpOyAKCX0KfQ==