class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: D = None
        self.t: E = None
        self.p: C = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: D = None
        self.y: E = None
        self.o: E = None
        self.z: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

g = A("g")
l = B("l")
e = C("e")
n = D("n")
m = E("m")
c = F("c")
i = D("i")

g.v = l
g.o = i
g.t = m
g.p = e
g.x = c
l.r = m
e.t = l
n.p = m
n.y = m
n.o = m
n.w = i
n.z = i
m.u = l
c.t = l
i.p = m
i.y = m
i.o = m
i.w = n
i.z = n
assert i.w.w.z.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: D = None
        self.t: E = None
        self.p: C = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: D = None
        self.y: E = None
        self.o: E = None
        self.z: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

g = A("g")
l = B("l")
e = C("e")
n = D("n")
m = E("m")
c = F("c")
i = D("i")

g.v = l
g.o = i
g.t = m
g.p = e
g.x = c
l.r = m
e.t = l
n.p = m
n.y = m
n.o = m
n.w = i
n.z = i
m.u = l
c.t = l
i.p = m
i.y = m
i.o = m
i.w = n
i.z = n
assert i.w.w.z.p.txt == "m"